
Untitled
By: a guest on
Jul 24th, 2012 | syntax:
None | size: 0.55 KB | hits: 8 | expires: Never
Type errors with Parsec
import Text.ParserCombinators.Parsec hiding (many, optional, (<|>))
import Text.ParserCombinators.Parsec.Char
import Text.Parsec.String
import Control.Applicative
p_int = many char ' ' *> many1 digit <* many char ' '
Couldn't match expected type `[Char]'
with actual type `Text.Parsec.Prim.ParsecT s0 u0 m0 [a0]'
In the return type of a call of `many1'
In the second argument of `(*>)', namely `many1 digit'
In the first argument of `(<*)', namely
`many char ' ' *> many1 digit'
many char ' '
many (char ' ')