*sigh*. I wonder why comments like this in Dynamic.lhs

"Provided the implementor of other @Typeable@ instances
takes care of making all the @TyCon@s CAFs (toplevel constants),
this will work." 

...donīt get written in bold, bright and friendly letters across the
(HTML-)documentation...
Of course afterwards it seems straight forward to skim *all* of the
library source-file,
but I suggest putting this note near the *top* of Dynamic.lhs ;)

If you donīt create a function like

> instance Typeable Msg where
>   typeOf _ = mkAppTy msgTc []
> msgTc :: TyCon
> msgTc = mkTyCon "Msg"

but simply use

> instance Typeable Msg where
>   typeOf _ = mkAppTy (mkTyCon "Msg") []

you can search for hours why "fromDynamic" wonīt work.

Volker
-- 
"I came out of it dead broke, without a house, without anything, except
a
girlfriend and a knowledge of Unix." "Well, thatīs something. Normally
those
two are mutually exclusive." N. Stephenson, "Cryptonomicon"

S/MIME Cryptographic Signature

Reply via email to