Alllow static pointers to local closed definitions
A limitation of the original patch implementing -XStaticPointers
is that while the following all work,
t1 = static not
t2 = static (\x -> case x of True -> False; False -> True)
the below does not:
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).
Trac metadata
Trac field | Value |
---|---|
Version | 7.10.3 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | edsko, facundo.dominguez |
Operating system | |
Architecture |