On Dec 8, 2007, at 21:40 , Brandon S. Allbery KF8NH wrote:


On Dec 8, 2007, at 21:38 , Ryan Bloor wrote:

 test :: Parser (Char,Char)
 test  = do x <- item
               item

The second and subsequent lines are indented too much, so are read as a continuation of the first; which, starting with "x <- ", is not an expression.

I neglected to say the proper indentation:

  test  = do x <- item
item -- note, indented to match the token after the "do"
             y <- item
             return (x,y)

--
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] [EMAIL PROTECTED]
system administrator [openafs,heimdal,too many hats] [EMAIL PROTECTED]
electrical and computer engineering, carnegie mellon university    KF8NH


_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to