Template Haskell does not support type families.
{-# LANGUAGE TemplateHaskell, TypeFamilies #-}
import Language.Haskell.TH
type family A a
$((\x -> x >>= (runIO . (print . ppr)) >> return []) $
[d|type instance A (Maybe Int) = Int|])
GHCi load result:
[1 of 1] Compiling Main ( a.hs, interpreted )
type A = GHC.Types.Int
Ok, modules loaded: Main.
TySynD has list of Names as an argument list whereas type families header should have a list of Types.
Trac metadata
Trac field | Value |
---|---|
Version | 6.10.1 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |