[Haskell-cafe] Parse error on input "|"

Akijmo sippy at gmx.de
Thu May 31 11:09:23 EDT 2007


Hi everyone.
I am new to this Forum, Haskell and i am german, so i am sorry for "noob"
failures or spelling mistakes.

I am currently learning for an informatic exam (11th class) and i tried to
code a function to sum a polynom with a pair of polynoms... (I actually want
to to code a polynomdivision in which i need this)

But I get the parse error mentioned in the headline. It is referring to the
first line of the case differentiation.
Hopefully you can help me, here's the code:

polyplusd :: Polynom -> (Polynom, Polynom) -> Polynom
polyplusd [] p = p
polyplusd p [] = p
polyplusd p@((g1,e1):p1) (n, (q@((g2,e2):p2))
				| g1>g2 = (g1,e1):(polyplusd p1 (n,q))
				| g2>g1 = (g2,e2):(polyplusd p (n,p2))
				| g1==g2 && e1+e2 /=0 =(g1, e1+e2):(polyplusd p1 (n,p2))
				| otherwise = polyplusd p1 (n,p2)
-- 
View this message in context: http://www.nabble.com/Parse-error-on-input-%22%7C%22-tf3847082.html#a10895849
Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.



More information about the Haskell-Cafe mailing list