many
Parses zero or more occurrences of the given parser.
Parses one or more occurrences of the given parser.
manyTill p end parses zero or more occurrences of p, until end succeeds. Returns a list of values returned by p.
many p applies the parser p zero or more times. Returns a list of the returned values of p.
> identifier = do{ c <- letter
> ; cs <- many (alphaNum <|> char '_')
> ; return (c:cs)
> }
many1 p applies the parser p one or more times. Returns a list of the returned values of p.
> word = many1 letter
manyTill p end applies parser p zero or more times until parser end succeeds. Returns the list of values returned by p. This parser can be used to scan comments:
> simpleComment = do{ string "<!--"
> ; manyTill anyChar (try (string "-->"))
> }
Note the overlapping parsers anyChar and string "-->", and therefore the use of the try combinator.
Like many, but discards the result.
Like many1, but discards the result.
Replicates a withXXX combinator over a list of objects, yielding a list of marshalled objects
Send data to the socket. The socket must be in a connected state. The data is sent as if the parts have been concatenated. This function continues to send data until either all data has been sent or an error occurs. On error, an exception is raised, and there is no way to determine how much data, if any, was successfully sent.
Send data to the socket. The recipient can be specified explicitly, so the socket need not be in a connected state. The data is sent as if the parts have been concatenated. This function continues to send data until either all data has been sent or an error occurs. On error, an exception is raised, and there is no way to determine how much data, if any, was successfully sent.
skipMany p applies the parser p zero or more times, skipping its result.
> spaces = skipMany space
skipMany1 p applies the parser p one or more times, skipping its result.