type family does not get expanded in ghc-6.12.1
The following code (which is a trimmed down version of an application of the multirec library) does not compile on ghc-6.12.1, but it does with ghc-6.10.4. Why?
{-# LANGUAGE GADTs, TypeFamilies #-}
type family TF a :: * -> *
type instance TF () = App (Equ ())
data Equ ix ix' where Refl :: Equ ix ix
data App f x = App (f x)
-- does not typecheck in 6.12.1 (but works in 6.10.4)
bar :: TF () () -> ()
bar (App Refl) = ()
-- does typecheck in 6.12.1 and 6.10.4
ar :: App (Equ ()) () -> ()
ar (App Refl) = ()
Trac metadata
| Trac field | Value |
|---|---|
| Version | 6.12.1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler (Type checker) |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | andres@cs.uu.nl, jpm@cs.uu.nl, stefan@cs.uu.nl |
| Operating system | |
| Architecture |