Michelson.Parser.Helpers
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.
endBy2 p sep
p
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.