[GHC] #7015: Add support for 'static'
GHC
ghc-devs at haskell.org
Fri Aug 22 12:20:04 UTC 2014
#7015: Add support for 'static'
-------------------------------------+-------------------------------------
Reporter: edsko | Owner:
Type: feature | Status: patch
request | Milestone: 7.10.1
Priority: normal | Version: 7.4.2
Component: Compiler | Keywords:
Resolution: | Architecture: Unknown/Multiple
Operating System: | Difficulty: Unknown
Unknown/Multiple | Blocked By:
Type of failure: | Related Tickets:
None/Unknown |
Test Case: |
Blocking: |
Differential Revisions: Phab:D119 |
-------------------------------------+-------------------------------------
Comment (by facundo.dominguez):
Forbidding polymorphic types in the static form makes it less obvious
defining a combinator like the following:
{{{
staticCompose :: Static (b -> c) -> Static (a -> b) -> Static (a -> c)
staticCompose sf sg = staticLabel (static (.)) `staticApply` sf
`staticApply` sg
}}}
This is actually defined in the version of distributed-static in hackage:
{{{
composeStatic :: (Typeable a, Typeable b, Typeable c) => Static ((b -> c)
-> (a -> b) -> a -> c)
composeStatic = staticLabel "$compose"
staticCompose :: (Typeable a, Typeable b, Typeable c)
=> Static (b -> c) -> Static (a -> b) -> Static (a -> c)
staticCompose g f = composeStatic `staticApply` g `staticApply` f
}}}
It doesn't mean that we can't live with the restriction, but we will have
to figure out the impact upwards before committing, I guess.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/7015#comment:28>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list