[Haskell-cafe] First time haskell - parse error!

boblettoj boblettoj99 at msn.com
Tue Mar 9 14:04:58 EST 2010


Hi, i am getting an error when trying to compile this part of my program, its
my first time using haskell and as lovely as it is it didn't give me very
much to go on in the error message!

<code>score :: String -> String -> String
score [s] [] = false
score [s] [g] = 
	if valid 4 g
	then (s1 ++ s2 ++ s3 ++ s4) where
		s1 = "Golds "
		s2 = show (gold s g)
		s3 = ", Silvers "
		s4 = show (silver s g)
	else "Bad Guess"</code>

when i try to compile it says: test.hs 63:29: parse error on input 'where'
(its the line beginning with 'then')
Anybody got any ideas whats going on?
thanks!
-- 
View this message in context: http://old.nabble.com/First-time-haskell---parse-error%21-tp27839657p27839657.html
Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.



More information about the Haskell-Cafe mailing list