morley-1.16.1: Developer tools for the Michelson Language
Safe HaskellNone
LanguageHaskell2010

Morley.Michelson.Parser.Helpers

Synopsis

Documentation

mkParser :: (a -> Text) -> a -> Parser a Source #

Make a parser from a string

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.

positive :: Parser Positive Source #

Parse a positive number.