morley-1.20.0: Developer tools for the Michelson Language
Safe HaskellSafe-Inferred
LanguageHaskell2010

Morley.Michelson.Parser.Helpers

Synopsis

Documentation

sepEndBy1 :: MonadPlus m => m a -> m sep -> m (NonEmpty a) Source #

Version of sepEndBy1 returning a NonEmpty list

some' :: MonadPlus f => f a -> f (NonEmpty a) Source #

Version of some returning a NonEmpty list

sepBy1 :: MonadPlus f => f a -> f sep -> f (NonEmpty a) Source #

Version of sepBy1 returning a NonEmpty list

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.