[GHC] #7015: Add support for 'static'
GHC
ghc-devs at haskell.org
Fri Aug 22 10:50:17 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 simonpj):
Edsko my remark about a "hack" was not intended as a criticism. Of course,
if GHC is inadequate you must hack around its shortcomings. My intent was
solely this: let's not enshrine a temporary hack into the design of the
language that GHC implements.
There are two things going on in this ticket:
* What should be the specification of the feature that GHC implements?
I think we are agreeing that: the argument of `static` should have no free
type variables. Let's put that into the spec.[[BR]][[BR]]
That leaves open the question of adding an impredicative-like feature,
the ability to have terms of type `Static (forall a. [a] -> [a])`, which
make perfect sense, have no free type variables, but which are disallowed
at present.
* Given the above restriction, and the absence of the impredicative
support, how can we hack around the restriction to get something like
polymorphism. This is the `Any` discussion on #9429. Even lacking a fix
for poly-kinded `Any`, it's not a disaster because for any particular kind
we can always do the job; it's just a bit inelegant.
If we agree about these things, perhaps you can update the wiki page as
above and we can go from there.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/7015#comment:26>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list