[Haskell-beginners] GHCi won't allow type declaration as shown in LYAHFGG
Keshav Kini
keshav.kini at gmail.com
Thu May 31 23:16:04 CEST 2012
Stan Kulp <stan_kulp at yahoo.com> writes:
> 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
As far as I can see, the live version of `the section you mention`_ on
learnyouahaskell.com does not contain this text - it doesn't have the
"ghci> " at the beginning of the line. Besides what others have said in
response to your question, I would add that you should make sure to read
LYAH on the website if possible - other sources might be out of date, as
I think the author does update the website version from time to time.
.. _the section you mention:
http://learnyouahaskell.com/syntax-in-functions#pattern-matching
-Keshav
More information about the Beginners
mailing list