[<<][compsci][>>][..]
Sun Aug 21 15:47:57 CEST 2011

Data.Typeable

According to Felipe[1] there is a way around the problem by using
Data.Typeable[2].  I still need to read again to make sure I get it
fully.

The idea is to move some of the type checking to run-time.  Of course
this makes it possible to have run-time errors or "default behaviour"
when the types do not match.

Maybe it's possible to enforce well-behavedness using some other
wrapper?

The bad behaviour seems to come from control flow, i.e. pattern
matching (case) or if .. then .. else.  Assuming this is the case then
one can say this works "if the user doesn't use control flow".  I'm
not so sure this is a good idea.

   It's a Monad, except when it's not.  And you'll find out when you
   run the program.

I think I'm sticking to Arrow unless I get a non-dynamic solution.
It's a nice trick to know though.

TODO: read again, test it and reply.


[1] http://www.mail-archive.com/haskell-cafe@haskell.org/msg92649.html
[2] http://haskell.org/ghc/docs/latest/html/libraries/base/Data-Typeable.html



[Reply][About]
[<<][compsci][>>][..]