Safe Haskell | None |
---|---|
Language | Haskell2010 |
PlutusIR.Parser
Synopsis
- topSourcePos :: SourcePos
- parse :: Parser SourcePos a -> String -> Text -> Either (ParseErrorBundle Text (ParseError SourcePos)) a
- parseQuoted :: Parser SourcePos a -> String -> Text -> Quote (Either (ParseErrorBundle Text (ParseError SourcePos)) a)
- term :: (Parsable (SomeTypeIn (Kinded uni)), Closed uni, uni `Everywhere` Parsable, Bounded fun, Enum fun, Pretty fun) => Parser SourcePos (Term TyName Name uni fun SourcePos)
- typ :: Parsable (SomeTypeIn (Kinded uni)) => Parser SourcePos (Type TyName uni SourcePos)
- program :: (Parsable (SomeTypeIn (Kinded uni)), Closed uni, uni `Everywhere` Parsable, Bounded fun, Enum fun, Pretty fun) => Parser SourcePos (Program TyName Name uni fun SourcePos)
- plcTerm :: (Parsable (SomeTypeIn (Kinded uni)), Closed uni, uni `Everywhere` Parsable, Bounded fun, Enum fun, Pretty fun) => Parser SourcePos (Term TyName Name uni fun SourcePos)
- plcProgram :: (Parsable (SomeTypeIn (Kinded uni)), Closed uni, uni `Everywhere` Parsable, Bounded fun, Enum fun, Pretty fun) => Parser SourcePos (Program TyName Name uni fun SourcePos)
- type Parser ann = ParsecT (ParseError ann) Text (StateT ParserState Quote)
- data SourcePos
Documentation
parse :: Parser SourcePos a -> String -> Text -> Either (ParseErrorBundle Text (ParseError SourcePos)) a Source #
parseQuoted :: Parser SourcePos a -> String -> Text -> Quote (Either (ParseErrorBundle Text (ParseError SourcePos)) a) Source #
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 #
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
Eq SourcePos | |
Data SourcePos | |
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 | |
Defined in Text.Megaparsec.Pos | |
Read SourcePos | |
Show SourcePos | |
Generic SourcePos | |
NFData SourcePos | |
Defined in Text.Megaparsec.Pos | |
Pretty SourcePos Source # | |
type Rep SourcePos | |
Defined in Text.Megaparsec.Pos type Rep SourcePos = D1 ('MetaData "SourcePos" "Text.Megaparsec.Pos" "megaparsec-9.2.0-6OuqRGfDLEb2S8YBM21E1k" '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)))) |