RE: [Haskell-cafe] compilation question

2008-11-11 Thread Mitchell, Neil
Hi The one way to test this is to benchmark, everything else will just be peoples random guesses. As for my random guess, eval should be significantly faster than peval in Hugs, and probably slightly faster than peval in GHC. I don't see why you think peval is efficient - monads /= efficiency,

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, var ::