[GHC] #13546: Kind error with type equality
GHC
ghc-devs at haskell.org
Mon Apr 10 02:40:20 UTC 2017
#13546: Kind error with type equality
-------------------------------------+-------------------------------------
Reporter: int-index | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler (Type | Version: 8.0.1
checker) |
Resolution: | Keywords: TypeInType
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):
I agree with GHC here.
The problem is that `UnT` takes `k` as a parameter. It does ''not'' look
at the kind at which its argument is used and return something of that
kind.
So, in the type of `tunt`, the first `T` is applied at an unknown kind,
which is also the return kind of `UnT`. Of course, you want this to be
`Symbol`, but GHC doesn't know this. Adding a kind signature fixes the
problem:
{{{#!hs
tunt :: Dict (T (UnT (T "a") :: Symbol) ~ T "a")
tunt = Dict
}}}
Please close the ticket if you agree with my analysis. Thanks!
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13546#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list