
11 Jul
2008
11 Jul
'08
12:41 p.m.
Hey all, I've reduced my previous problem to a small example. Anyone know why typeOf (...) would work, but typeOf [...] would not? Is the derivation for lists funky? data Expr f = In (f (Expr f)) instance Typeable1 f => Typeable (Expr f) where typeOf (In x) = mkTyConApp (mkTyCon "TypeTest.Expr") [typeOf1 x] data Foo e = Foo deriving instance Typeable1 Foo *TypeTest> typeOf (In Foo) TypeTest.Expr TypeTest.Foo *TypeTest> typeOf [In Foo] *** Exception: Prelude.undefined