[GHC] #11471: Kind polymorphism and unboxed types: bad things are happening
GHC
ghc-devs at haskell.org
Thu Jan 21 14:55:29 UTC 2016
#11471: Kind polymorphism and unboxed types: bad things are happening
-------------------------------------+-------------------------------------
Reporter: bgamari | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler (Type | Version: 7.10.3
checker) | Keywords: TypeInType,
Resolution: | LevityPolymorphism
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by goldfire):
Re comment:2: Try with `-fprint-explicit-coercions`. Here's what I think
is happening, though I don't have a fresh enough build locally to check:
`foo :: Proxy a -> F a -> F a` becomes `foo :: forall k2 (a :: *). Proxy *
a -> F k2 a -> F k2 a`. Note that `F` is not polymorphic in the kind of
`a`, which defaults to `*`. We also know that `k2` must be either `*` or
`#`, because `F k2 a :: k2` is an argument of an arrow. GHC wisely
defaults it to `*`, leading to the second error.
Once we clean up kind errors with coercions, I think the error messages
will improve. There's also clearly the word `kind` appearing where `type`
should in the first message. But these errors are legitimate.
As for the larger issue, we'll need to discuss.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11471#comment:6>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list