#5716: Failure when using promoted data family instances
------------------------------+---------------------------------------------
Reporter: dreixel | Owner:
Type: bug | Status: new
Priority: normal | Component: Compiler
Version: 7.3 | Keywords:
Os: Unknown/Multiple | Architecture: Unknown/Multiple
Failure: None/Unknown | Testcase:
Blockedby: | Blocking:
Related: |
------------------------------+---------------------------------------------
The following code should fail (since we don't promote data families), but
it should do so gracefully:
{{{
{-# LANGUAGE GADTs #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE PolyKinds #-}
module Bug1 where
data family DF a
data instance DF Int = DFInt
data U = U1 (DF Int)
data I :: U -> * where I1 :: I (U1 DFInt)
{-
GHC internal error: `DFInt' is not in scope during type checking, but
it passed the renamer
tcl_env of environment: [(r9P, AThing U -> *), (r9Q, ANothing)]
In the type `I (U1 DFInt)'
In the definition of data constructor `I1'
In the data type declaration for `I'
-}
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5716>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs