> ...No surprise there, since there is no way to fail in the event of a
> maltyped "Expr".  The next thing to try is a type class solution... 

Think about it: you need to do type checking.
For our little language we used Template Haskell to do your "Expr -> Term a"
translation, thus the type-checking of our input programs is actually done
by Haskell's type checker ;-)

See our PLPV paper http://www.iro.umontreal.ca/~monnier/tct.pdf


        Stefan

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to