|
Text.ParserCombinators.UU.Derived |
|
|
|
Synopsis |
|
|
|
Documentation |
|
|
Optionally recognize parser p.
If p can be recognized, the return value of p is used. Otherwise,
the value v is used. Note that opt is greedy, if you do not want
this use ... | pure v instead. Furthermore, p should not
recognise the empty string, since this would make your parser ambiguous!!
|
|
|
|
(<$$>) :: (a -> b -> c) -> P st b -> P st (a -> c) | Source |
|
|
(<??>) :: P st a -> P st (a -> a) -> P st a | Source |
|
|
pPacked :: P st b1 -> P st b2 -> P st a -> P st a | Source |
|
This can be used to parse x surrounded by l and r.
Example:
pParens = pPacked pOParen pCParen
|
|
pFoldr :: (a -> a1 -> a1, a1) -> P st a -> P st a1 | Source |
|
|
pFoldr_ng :: (a -> a1 -> a1, a1) -> P st a -> P st a1 | Source |
|
|
pFoldr1 :: (v -> b -> b, b) -> P st v -> P st b | Source |
|
|
pFoldr1_ng :: (v -> b -> b, b) -> P st v -> P st b | Source |
|
|
pFoldrSep :: (v -> b -> b, b) -> P st a -> P st v -> P st b | Source |
|
|
pFoldrSep_ng :: (v -> b -> b, b) -> P st a -> P st v -> P st b | Source |
|
|
pFoldr1Sep :: (a -> b -> b, b) -> P st a1 -> P st a -> P st b | Source |
|
|
pFoldr1Sep_ng :: (a -> b -> b, b) -> P st a1 -> P st a -> P st b | Source |
|
|
list_alg :: (a -> [a] -> [a], [a1]) | Source |
|
|
|
|
|
|
|
|
|
|
pListSep :: P st a1 -> P st a -> P st [a] | Source |
|
|
pListSep_ng :: P st a1 -> P st a -> P st [a] | Source |
|
|
pList1Sep :: P st a1 -> P st a -> P st [a] | Source |
|
|
pList1Sep_ng :: P st a1 -> P st a -> P st [a] | Source |
|
|
pChainr :: P st (c -> c -> c) -> P st c -> P st c | Source |
|
|
pChainr_ng :: P st (c -> c -> c) -> P st c -> P st c | Source |
|
|
pChainl :: P st (c -> c -> c) -> P st c -> P st c | Source |
|
|
pChainl_ng :: P st (c -> c -> c) -> P st c -> P st c | Source |
|
|
pAny :: (a -> P st a1) -> [a] -> P st a1 | Source |
|
Parses using any of the parsers in the list l.
|
|
|
Parses any of the symbols in l.
|
|
|
|
|
|
Produced by Haddock version 2.4.2 |