Subject: [Haskell] Ambiguous type variable when using Data.Generic
>
> Hello,
>
> I'm writing a function 'preProcess' that simplifies the AST that comes
out
> of
> Language.Haskell.Parser.parseModule. Simplifying means rewriting infix
> applications to normal p
On 5/20/06, Bas van Dijk <[EMAIL PROTECTED]> wrote:
simplifyExp (HsLeftSection e op)= HsApp (opToExp op) e
simplifyExp (HsRightSection op e) = HsApp (opToExp op) e
By the way, I think this looks wrong. One of these needs to create a
lambda expression.
--
Taral <[EMAIL PROTECTED]>
On 5/20/06, Bas van Dijk <[EMAIL PROTECTED]> wrote:
How can I make this work?
As far as I know, you can't. To see the problem, rewrite it using dictionaries:
data Simplify a = Simplify { simplify :: a -> a }
simplify_HsExp (HsInfixApp e1 op e2) = HsApp (HsApp (opToExp op) e1) e2
simplify_HsEx
Hi Bas,
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 y
Hello,
I'm writing a function 'preProcess' that simplifies the AST that comes out of
Language.Haskell.Parser.parseModule. Simplifying means rewriting infix
applications to normal prefix applications (in both patterns and
expressions), removing parentheses, rewriting guards to if-then-else
expr