[GHC] #9636: Function with type error accepted
GHC
ghc-devs at haskell.org
Sat Sep 27 08:43:00 UTC 2014
#9636: Function with type error accepted
-------------------------------------+-------------------------------------
Reporter: augustss | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.8.3
Resolution: | Keywords:
Operating System: | Architecture: Unknown/Multiple
Unknown/Multiple | Difficulty: Unknown
Type of failure: | Blocked By:
None/Unknown | Related Tickets:
Test Case: |
Blocking: |
Differential Revisions: |
-------------------------------------+-------------------------------------
Comment (by dreixel):
I don't see why `T Bool` is "not a type". If you really want something
like that, you should index `T` over a closed kind:
{{{
{-# LANGUAGE DataKinds, TypeFamilies #-}
data Un = TInt
type family T (a :: Un) :: * where
T TInt = ()
}}}
Now it's clear that `T Bool` is indeed not a type, and gives rise to a
kind error.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9636#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list