Failure when using promoted data family instances
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'
-}
Trac metadata
| Trac field | Value |
|---|---|
| Version | 7.3 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | jpm@cs.uu.nl |
| Operating system | |
| Architecture |