[Haskell-cafe] newbe question

feucht at uni-koblenz.de feucht at uni-koblenz.de
Tue Sep 27 05:34:06 EDT 2005


Hi
i can not load program test1 into hugs, but test2 works.
Am i missing some special syntax?

greetings,
Philip

-------------- test1 ------------------

foo :: Maybe Int -> Int
foo Nothing =-1
foo (Just a)= a

-------------- test2 ------------------

foo :: Maybe Int -> Int
foo Nothing = -1
--           ^
--           +-- note an extra space
foo (Just a)= a


More information about the Haskell-Cafe mailing list