[GHC] #7347: Existential data constructors should not be promoted
GHC
cvs-ghc at haskell.org
Fri Oct 19 13:52:56 CEST 2012
#7347: Existential data constructors should not be promoted
---------------------------------+------------------------------------------
Reporter: simonpj | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.6.1
Keywords: | Os: Unknown/Multiple
Architecture: Unknown/Multiple | Failure: None/Unknown
Difficulty: Unknown | Testcase:
Blockedby: | Blocking:
Related: |
---------------------------------+------------------------------------------
Stefan Holdermans reports: I am almost sure this is a known issue, but I
noticed some erroneous (?) interaction between datatype promotion and
existential quantification. Consider the following program:
{{{
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE KindSignatures #-}
module Test where
data K = forall a. T a -- promotion gives 'T :: * -> K
data G :: K -> * where
D :: G (T []) -- kind error!
}}}
I would expect the type checker to reject it, but GHC (version 7.6.1)
compiles it happily
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7347>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list