[GHC] #12928: Too easy to trigger CUSK condition using TH
GHC
ghc-devs at haskell.org
Mon Dec 5 22:39:24 UTC 2016
#12928: Too easy to trigger CUSK condition using TH
-------------------------------------+-------------------------------------
Reporter: int-index | Owner:
Type: feature request | Status: new
Priority: high | Milestone:
Component: Compiler (Type | Version: 8.0.1
checker) |
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: GHC rejects | Unknown/Multiple
valid program | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by goldfire):
Another way to see the difference is that GHC uses the definition of a
type to inform its kinds. That is,
{{{
data T a = MkT (a Int)
}}}
will infer `a :: Type -> Type`.
On the other hand, term-level type signatures stand entirely on their own,
as Simon says.
So,
{{{
x :: forall a. Proxy a
x = Proxy :: Proxy (a :: Type)
}}}
is rejected, even though choosing `a :: Type` in the type signature would
work here.
I've been favoring having standalone type-level kind signatures for some
time, and am waiting for the right time to introduce a ghc-proposal to
this end. CUSKs are terribly fiddly and very unexpected to users!
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12928#comment:9>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list