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

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 #

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.

mparens :: Parser a -> Parser a Source #

Parse expression which can be wrapped in parentheses.