Re: [Haskell-cafe] Instancing "Typeable" for monad transformers?

2 Feb
2011
2 Feb
'11
4:21 a.m.
One can do something a bit shorter
instance (Typeable a, Typeable1 m) => Typeable1 (Iteratee a m) where typeOf1 i = mkTyConApp (mkTyCon "Data.Enumerator.Iteratee") [typeOf a, typeOf1 m] where (a,m) = peel i peel :: Iteratee a m w -> (a, m ()) peel = undefined
still a bother to write every time one needs it, but tolerable. Only the signature of 'peel' matters.
5222
Age (days ago)
5222
Last active (days ago)
0 comments
1 participants
participants (1)
-
oleg@okmij.org