[Haskell-cafe] The "Exp -> Term a" problem (again), how to dynamically create (polymorphic) typed terms in Haskell ??

Tomasz Zielonka tomasz.zielonka at gmail.com
Thu Oct 4 23:06:21 EDT 2007


On Thu, Oct 04, 2007 at 05:05:23PM +0100, Pasqualino 'Titto' Assini wrote:
> Hello Tomasz,
> 
> thank you very much for your advice.
> 
> Just a quick question, why using your own Dyn rather than Data.Dynamic?

Well, it's a bit different from Data.Dynamic. You have a guarantee that
(Dyn Term) contains (Term t) for some t. Besides, making Term an instance
of Typeable wouldn't buy us anything. You would have to define Type GADT
anyway.

Best regards
Tomek


More information about the Haskell-Cafe mailing list