plutus-core-0.1.0.0: Language library for Plutus Core
Safe HaskellNone
LanguageHaskell2010

PlutusIR.Parser

Synopsis

Documentation

term :: (Parsable (SomeTypeIn (Kinded uni)), Closed uni, uni `Everywhere` Parsable, Bounded fun, Enum fun, Pretty fun) => Parser SourcePos (Term TyName Name uni fun SourcePos) Source #

program :: (Parsable (SomeTypeIn (Kinded uni)), Closed uni, uni `Everywhere` Parsable, Bounded fun, Enum fun, Pretty fun) => Parser SourcePos (Program TyName Name uni fun SourcePos) Source #

plcTerm :: (Parsable (SomeTypeIn (Kinded uni)), Closed uni, uni `Everywhere` Parsable, Bounded fun, Enum fun, Pretty fun) => Parser SourcePos (Term TyName Name uni fun SourcePos) Source #

plcProgram :: (Parsable (SomeTypeIn (Kinded uni)), Closed uni, uni `Everywhere` Parsable, Bounded fun, Enum fun, Pretty fun) => Parser SourcePos (Program TyName Name uni fun SourcePos) Source #

type Parser ann = ParsecT (ParseError ann) Text (StateT ParserState Quote) Source #

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

Associated Types

type Rep SourcePos :: Type -> Type Source #

NFData SourcePos 
Instance details

Defined in Text.Megaparsec.Pos

Methods

rnf :: SourcePos -> () Source #

Pretty SourcePos Source # 
Instance details

Defined in PlutusCore.Error

Methods

pretty :: SourcePos -> Doc ann Source #

prettyList :: [SourcePos] -> Doc ann Source #

type Rep SourcePos 
Instance details

Defined in Text.Megaparsec.Pos

type Rep SourcePos = D1 ('MetaData "SourcePos" "Text.Megaparsec.Pos" "megaparsec-9.2.0-K575ggBPfPkLwDXcBOR6kv" 'False) (C1 ('MetaCons "SourcePos" 'PrefixI 'True) (S1 ('MetaSel ('Just "sourceName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FilePath) :*: (S1 ('MetaSel ('Just "sourceLine") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 Pos) :*: S1 ('MetaSel ('Just "sourceColumn") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 Pos))))