an example from YAHT doesn't run

Hello, On pdf page 43 of YAHT it provides a code example. I typed this into a file named "Guess.hs" and tried unsuccessfully to load it into ghci. I am running ghci version 6.8.2 This is the output it gave me: " [1 of 1] Compiling Main ( Guess.hs, interpreted ) Guess.hs:19:12: parse error on input `doGuessing' Failed, modules loaded: none. " I've attached the code module. As far as I can tell it is identical to the example in YAHT. Did I type it wrong, is the tutorial wrong, or something else? thanks again, Jared Langson

Hi Jared,
2008/6/21
Guess.hs:19:12: parse error on input `doGuessing'
Failed, modules loaded: none. "
That says there's something wrong at line 19. In this case, 'doGuessing' is not properly aligned with 'putStrLn' of the previous line. The same happens at line 22. See if that helps and double-check the rules of indentation. : ) Paulo
participants (2)
-
Paulo Tanimoto
-
trifod@gmail.com