[GHC] #8084: Enabling PolyKinds makes some type errors weird
GHC
ghc-devs at haskell.org
Tue Jul 23 11:36:01 CEST 2013
#8084: Enabling PolyKinds makes some type errors weird
--------------------------------------------+------------------------------
Reporter: MartijnVanSteenbergen | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler (Type checker) | Version: 7.6.3
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: None/Unknown | Unknown/Multiple
Test Case: | Difficulty: Unknown
Blocking: | Blocked By:
| Related Tickets:
--------------------------------------------+------------------------------
Comment (by MartijnVanSteenbergen):
Ah, the messages make more sense now. It took me a while to see how to
read those types.
So, to make sure I understand everything correctly, the kinds are as
follows:
{{{
Any :: forall k. (k -> *) -> *
X :: forall k. k -> *
Y :: * -> *
Z :: Bool -> *
}}}
And whenever a kind has a forall in it, GHC shows how it instantiated that
kind variable.
As for preference, I can imagine that having this information is very
valuable, but I think it's confusing to use notation that is
indistinguishable from normal type application. So something like `Any {*}
Y` would help.
I also think it would help if the User's Guide explained that GHC shows
this extra information, with Simon's example of when this information is
needed.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8084#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list