[GHC] #11656: Alllow static pointers to local closed definitions
GHC
ghc-devs at haskell.org
Sun Feb 28 11:34:41 UTC 2016
#11656: Alllow static pointers to local closed definitions
-------------------------------------+-------------------------------------
Reporter: mboes | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.10.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:
-------------------------------------+-------------------------------------
A limitation of the original patch implementing `-XStaticPointers` is that
while the following all work,
{{{#!hs
t1 = static not
t2 = static (\x -> case x of True -> False; False -> True)
}}}
the below does not:
{{{#!hs
t3 = static foo where foo True = False
}}}
Yet `foo` is perfectly "static": it's a closed expression that can readily
be floated to top-level.
So in short: `-XStaticPointers` should not consider only expressions with
top-level identifiers, but in general any closed expression (which may
involve local closed identifiers too).
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11656>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list