[Haskell] Ambiguous type variable when using Data.Generic
ndmitchell at gmail.com
Sat May 20 11:26:12 EDT 2006
I had a requirement to do something similar as part of one of my
projects, essentially reduce full Haskell to a small and manageable
subset. Unfortunately I think you'll find that this task is a lot
bigger than you first realise, and in particular that case-of is
probably the expression you want to reduce everything to - rather than
if-then-else. case-of can represent pattern matches in a much more
uniform way than if-then-else, which is just a case-of on a boolean.
The way I went about this was by using Yhc -core  to generate a
Core language. GHC also has a Core language, which has various
differences to the Yhc generated Core, and may be more to your liking
(or perhaps less). I would suggest you explore these avenues before
trying to write your own simplifier.
More information about the Haskell