I don't think GHCi allows function and type definitions in interactive mode.
You have to write the functions in a source file and then load it. You can then call the functions as usual.
Homero Cardoso de Almeida
I have been working my way through "Learn You a Haskell for Greater Good" and am stumped when I get to the "Syntax in Functions - Pattern Matching" section.The book shows the following expression...ghci> lucky :: (Integral a) => a -> String...but when I try to execute it in GHCi I get the following error...<interactive>:1:1: Not in scope: `lucky'What am I missing?Stan Kulp
4421 W North Pinebrook Lane
Columbia, MO 65203
_______________________________________________
Beginners mailing list
Beginners@haskell.org
http://www.haskell.org/mailman/listinfo/beginners