On Apr 7, 2007, at 2:01 PM, Pepe Iborra wrote:

So what I would do is to create a thin wrapper:

>i = id :: Integer -> Integer

and write:

> input2 = [ InputDecs [ inp "emaLength" TyNumber ((i 20) + (i 40)) ] ]

I do it like this and it does save typing. It's not bad so I'll stick to it for now:

id = VarIdent

d = Double
i = Int
b = Bool
s = Str

d' = NumExpr . d
i' = NumExpr . i
b' = CondExpr . b
s' = StrExpr . s

n = NumExpr

(+) a b = NumExpr (NumOp Plus a b)

This is much less verbose than my OCaml version anyway.

--
http://wagerlabs.com/





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

Reply via email to