Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- sepEndBy1 :: MonadPlus m => m a -> m sep -> m (NonEmpty a)
- some' :: MonadPlus f => f a -> f (NonEmpty a)
- sepBy1 :: MonadPlus f => f a -> f sep -> f (NonEmpty a)
- sepBy2 :: MonadPlus m => m a -> m sep -> m (NonEmpty a)
- parseDef :: Default a => Parser a -> Parser a
- count :: (SingIPeano n, Applicative m) => m a -> m (SizedList n a)
Documentation
sepBy2 :: MonadPlus m => m a -> m sep -> m (NonEmpty a) Source #
endBy2 p sep
parses two or more occurrences of p
, separated by sep
.
parseDef :: Default a => Parser a -> Parser a Source #
Apply given parser and return default value if it fails.
count :: (SingIPeano n, Applicative m) => m a -> m (SizedList n a) Source #
Parse expression n
times, where n
is a type-level natural.
Essentially, a type-safe version of count
, but requires
the count to be known on the type level.