
Hello, I follow the instructions of script [1] in order to set up a parser functionality. But I' get into problems at page 202 with the code: p :: Parser (Char,Char) p = do x ← item item y ← item return (x,y) ghci and ghc throw errors: Prelude> let p:: Parser (Char,Char); p = do {x <- item; item; y <- item; return (x,y)} <interactive>:10:65: error: • Couldn't match type ‘[(Char, String)]’ with ‘Char’ Expected type: String -> [((Char, Char), String)] Actual type: Parser ([(Char, String)], [(Char, String)]) • In a stmt of a 'do' block: return (x, y) In the expression: do x <- item item y <- item return (x, y) In an equation for ‘p’: p = do x <- item item y <- item .... Did the semantics of do expr changed? [1] https://userpages.uni-koblenz.de/~laemmel/paradigms1011/resources/pdf/haskel... Cheers, iconfly.