[GHC] #15603: ref6 example from StaticPointers documentation doesn't type check
GHC
ghc-devs at haskell.org
Tue Sep 4 14:43:16 UTC 2018
#15603: ref6 example from StaticPointers documentation doesn't type check
-------------------------------------+-------------------------------------
Reporter: mpickering | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone: 8.6.1
Component: Compiler | Version: 8.4.3
Keywords: | Operating System: Unknown/Multiple
Architecture: | Type of failure: None/Unknown
Unknown/Multiple |
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
The
[https://downloads.haskell.org/~ghc/8.4.3/docs/html/users_guide/glasgow_exts.html?highlight=static%20pointers
#extension-StaticPointers documentation] for `StaticPointers` contains the
following example.
{{{
ref6 y = let x = 1 in static x
}}}
but this doesn't get accepted by the type checker.
{{{
sp.hs:27:23: error:
• ‘x’ is used in a static form but it is not closed because it
has a non-closed type because it contains the
type variables: ‘p_a7KP’
• In the expression: static x
In the expression: let x = 1 in static x
In an equation for ‘ref6’: ref6 y = let x = 1 in static x
|
27 | ref6 y = let x = 1 in static x
| ^^^^^^^
}}}
I tested on 8.6.1, 8.4.3, 8.2.2, 8.02, 7.10.3 and all fail.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15603>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list