
22 Jul
2003
22 Jul
'03
1:01 p.m.
data MyException = MkExc Int String
... but now it seems I have to install this as an instance of Typeable, and I don't see how to do that.
instance Typeable MyException where typeOf ? = ?
import Data.Dynamic myExceptionTc = mkTyCon "MyException" instance Typeable MyExceptionBasicSpec where typeOf _ = mkAppTy myExceptionTc [] The above should work, but I wonder when it is possible to simply derive Typeable? Cheers Christian