[Haskell-beginners] Could not get parser ready

Francesco Ariis fa-ml at ariis.it
Sun Nov 5 20:45:45 UTC 2017


On Sun, Nov 05, 2017 at 06:51:57PM +0100, Marcus Manning wrote:
> 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)}

Hello Marcus,
    what is the :type of `item`?


More information about the Beginners mailing list