Copyright | (c) Paweł Nowak |
---|---|
License | MIT |
Maintainer | Paweł Nowak <pawel834@gmail.com> |
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
Combinators that work with any sequence type.
- sepBy :: SemiIsoAlternative f => f a -> f () -> f [a]
- sepBy1 :: SemiIsoAlternative f => f a -> f () -> f [a]
- optional :: SemiIsoAlternative f => f a -> f (Maybe a)
- opt :: SemiIsoAlternative f => f () -> f ()
- opt_ :: SemiIsoAlternative f => f () -> f ()
Documentation
sepBy :: SemiIsoAlternative f => f a -> f () -> f [a] Source
Zero or more occurences of v
separated by s
.
sepBy1 :: SemiIsoAlternative f => f a -> f () -> f [a] Source
One or more occurences of v
separated by s
.
optional :: SemiIsoAlternative f => f a -> f (Maybe a) Source
One or none occurences of f
.
opt :: SemiIsoAlternative f => f () -> f () Source
Like optional
, but specialized for ()
.
opt_ :: SemiIsoAlternative f => f () -> f () Source
Parser one or more occurences of f
, but prints nothing.