[Haskell-beginners] Trying to find an alternative StateMonad
Ozgur Akgun
ozgurakgun at gmail.com
Wed Apr 14 19:22:24 EDT 2010
On 15 April 2010 00:15, Daniel Fischer <daniel.is.fischer at web.de> wrote:
> ...
> And you can pattern match on these constructors for different types in one
> function:
>
> eval :: Expr a -> a
> eval (Plain x) = x
> eval (Add e1 e2) = eval e1 + eval e2
> eval (If eb t f) = if eval eb then eval t else eval f
> eval (And e1 e2) = eval e1 && eval e2
> ...
>
but sadly you cannot have template haskell on them.
sorry to distract the op's question, but i am in trouble with trying to use
them both.
see this* sad and lonely thread, if you want to know what i'm talking about.
* http://www.haskell.org/pipermail/haskell-cafe/2010-April/076267.html
--
Ozgur Akgun
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/beginners/attachments/20100414/feb46e53/attachment.html
More information about the Beginners
mailing list