Re: [Haskell-cafe] compilation question

2008-11-11 Thread Derek Elkins
On Tue, 2008-11-11 at 18:49 +0100, Peter Padawitz wrote: > At first a type of arithmetic expressions and its generic evaluator: > > data Expr = Con Int | Var String | Sum [Expr] | Prod [Expr] | Expr :- > Expr | > Int :* Expr | Expr :^ Int > > data ExprAlg a = ExprAlg {con :: Int -> a, va

RE: [Haskell-cafe] compilation question

2008-11-11 Thread Mitchell, Neil
> [mailto:[EMAIL PROTECTED] On Behalf Of Peter Padawitz > Sent: 11 November 2008 5:49 pm > To: haskell-cafe@haskell.org > Cc: Hubert Wagner > Subject: [Haskell-cafe] compilation question > > At first a type of arithmetic expressions and its generic evaluator: > >

[Haskell-cafe] compilation question

2008-11-11 Thread Peter Padawitz
At first a type of arithmetic expressions and its generic evaluator: data Expr = Con Int | Var String | Sum [Expr] | Prod [Expr] | Expr :- Expr | Int :* Expr | Expr :^ Int data ExprAlg a = ExprAlg {con :: Int -> a, var :: String -> a, sum_ :: [a] -> a, prod :: [a] -> a, s