Copyright | © 2017–present Mark Karpov |
---|---|
License | BSD 3 clause |
Maintainer | Mark Karpov <markkarpov92@gmail.com> |
Stability | experimental |
Portability | portable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
The module provides
NonEmpty
list variants of some of the functions
from
Control.Applicative.Combinators
.
Since: 0.2.0
Synopsis
- some :: Alternative m => m a -> m ( NonEmpty a)
- endBy1 :: Alternative m => m a -> m sep -> m ( NonEmpty a)
- someTill :: Alternative m => m a -> m end -> m ( NonEmpty a)
- sepBy1 :: Alternative m => m a -> m sep -> m ( NonEmpty a)
- sepEndBy1 :: Alternative m => m a -> m sep -> m ( NonEmpty a)
Documentation
some :: Alternative m => m a -> m ( NonEmpty a) Source #
applies the parser
some
p
p
one
or more times and returns a
list of the values returned by
p
.
word = some letter
endBy1 :: Alternative m => m a -> m sep -> m ( NonEmpty a) Source #
parses
one
or more occurrences of
endBy1
p sep
p
, separated and
ended by
sep
. Returns a non-empty list of values returned by
p
.
someTill :: Alternative m => m a -> m end -> m ( NonEmpty a) Source #
works similarly to
someTill
p end
, but
manyTill
p end
p
should succeed at least once.
See also:
skipSome
,
skipSomeTill
.