plutus-core-1.0.0.1: Language library for Plutus Core
Safe Haskell None
Language Haskell2010

UntypedPlutusCore.Parser

Synopsis

Documentation

term :: Parser PTerm Source #

Parser for all UPLC terms.

parseTerm :: ByteString -> Either ( ParseErrorBundle Text ParseError ) PTerm Source #

Parse a UPLC term. The resulting program will have fresh names. The underlying monad must be capable of handling any parse errors.

parseProgram :: ByteString -> Either ( ParseErrorBundle Text ParseError ) ( Program Name DefaultUni DefaultFun SourcePos ) Source #

Parse a UPLC program. The resulting program will have fresh names. The underlying monad must be capable of handling any parse errors.

data SourcePos Source #

The data type SourcePos represents source positions. It contains the name of the source file, a line number, and a column number. Source line and column positions change intensively during parsing, so we need to make them strict to avoid memory leaks.

Instances

Instances details
Eq SourcePos
Instance details

Defined in Text.Megaparsec.Pos

Data SourcePos
Instance details

Defined in Text.Megaparsec.Pos

Methods

gfoldl :: ( forall d b. Data d => c (d -> b) -> d -> c b) -> ( forall g. g -> c g) -> SourcePos -> c SourcePos Source #

gunfold :: ( forall b r. Data b => c (b -> r) -> c r) -> ( forall r. r -> c r) -> Constr -> c SourcePos Source #

toConstr :: SourcePos -> Constr Source #

dataTypeOf :: SourcePos -> DataType Source #

dataCast1 :: Typeable t => ( forall d. Data d => c (t d)) -> Maybe (c SourcePos ) Source #

dataCast2 :: Typeable t => ( forall d e. ( Data d, Data e) => c (t d e)) -> Maybe (c SourcePos ) Source #

gmapT :: ( forall b. Data b => b -> b) -> SourcePos -> SourcePos Source #

gmapQl :: (r -> r' -> r) -> r -> ( forall d. Data d => d -> r') -> SourcePos -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> ( forall d. Data d => d -> r') -> SourcePos -> r Source #

gmapQ :: ( forall d. Data d => d -> u) -> SourcePos -> [u] Source #

gmapQi :: Int -> ( forall d. Data d => d -> u) -> SourcePos -> u Source #

gmapM :: Monad m => ( forall d. Data d => d -> m d) -> SourcePos -> m SourcePos Source #

gmapMp :: MonadPlus m => ( forall d. Data d => d -> m d) -> SourcePos -> m SourcePos Source #

gmapMo :: MonadPlus m => ( forall d. Data d => d -> m d) -> SourcePos -> m SourcePos Source #

Ord SourcePos
Instance details

Defined in Text.Megaparsec.Pos

Read SourcePos
Instance details

Defined in Text.Megaparsec.Pos

Show SourcePos
Instance details

Defined in Text.Megaparsec.Pos

Generic SourcePos
Instance details

Defined in Text.Megaparsec.Pos

NFData SourcePos
Instance details

Defined in Text.Megaparsec.Pos

Pretty SourcePos Source #
Instance details

Defined in PlutusCore.Error

type Rep SourcePos
Instance details

Defined in Text.Megaparsec.Pos