hledger-lib-1.3.1: Core data types, parsers and functionality for the hledger accounting tools

Safe HaskellNone
LanguageHaskell2010

Text.Megaparsec.Compat

Description

Paper over some differences between megaparsec 5 and 6, making it possible to write code that supports both.

Synopsis

Documentation

type MPErr = Void Source #

A basic parse error type.

mptext :: MonadParsec e Text m => Tokens Text -> m (Tokens Text) Source #

Parse and return some Text.

mpMkPos :: Int -> Pos Source #

Make a Pos. With a negative argument, throws InvalidPosException (megaparsec >= 6) or calls error (megaparsec < 6).

mpUnPos :: Pos -> Int Source #

Unmake a Pos.

mpMkParseError :: FilePath -> String -> ParseError Char String Source #

Make a simple parse error.