[Haskell-beginners] [Haskell-cafe] parser error in pattern
Michael Xavier
nemesisdesign at gmail.com
Tue Oct 18 04:20:45 CEST 2011
I'm finding it really hard to grok what this is even supposed to do but you
have:
eval1(If t1 t2 t3) = case (If t1 t2 t3) of
eval1(If t1 t2 t3) -> Just t1
Case doesn't work that way. It would be something like:
eval1 (If t1 t2 t3) = case (some expression) of
pattern1 -> somevalue
pattern2 -> anothervalue
I don't see the intent of pattern matching the exact argument to eval1.
What is the type of eval1?
Also, your filename is homework2.hs. Please read this page on the Haskell
wiki:
http://www.haskell.org/haskellwiki/Homework_help
That's not to say you shouldn't ask these questions here but note that most
of us will not do your homework for you. We will provide hints, but you
should be doing your due diligence to try to understand what your code is
doing and possible reasons why it isn't working.
--
Michael Xavier
http://www.michaelxavier.net
LinkedIn <http://www.linkedin.com/pub/michael-xavier/13/b02/a26>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20111017/8b86b70a/attachment.htm>
More information about the Beginners
mailing list