[GHC] #14887: Explicitly quantifying a kind variable causes a telescope to fail to kind-check (was: Explicitly quantifying a kind variable causes a type family to fail to typecheck)
GHC
ghc-devs at haskell.org
Sun Apr 22 14:38:43 UTC 2018
#14887: Explicitly quantifying a kind variable causes a telescope to fail to kind-
check
-------------------------------------+-------------------------------------
Reporter: RyanGlScott | Owner: goldfire
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler (Type | Version: 8.2.2
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: |
-------------------------------------+-------------------------------------
Changes (by RyanGlScott):
* keywords: TypeFamilies, TypeInType => TypeInType
Comment:
As it turns out, this is not at all specific to type families. The same
phenomenon occurs in data types:
{{{#!hs
data Foo1 (e :: Proxy (a :: k)) :: Type -- typechecks
data Foo2 (k :: Type) (e :: Proxy (a :: k)) :: Type -- doesn't typecheck
}}}
Or even plain old functions:
{{{#!hs
foo1 :: forall (e :: Proxy (a :: k)).
Int -- typechecks
foo1 = 42
foo2 :: forall (k :: Type) (e :: Proxy (a :: k)).
Int -- doesn't typecheck
foo2 = 42
}}}
So I'm guessing that any type variable telescope suffers from this issue.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14887#comment:6>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list