| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
UntypedPlutusCore.Parser
parseProgram :: (Text -> m (Program Name DefaultUni DefaultFun SrcSpan) #
Parse a UPLC program. The resulting program will have fresh names. The
underlying monad must be capable of handling any parse errors. This passes
"test" to the parser as the name of the input stream; to supply a name
explicity, use `parse program name inputText -> m (Program Name DefaultUni DefaultFun SrcSpan) #
Parse and rewrite so that names are globally unique, not just unique within their scope.
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
| Text.Megaparsec.Pos type Rep SourcePos = D1 ('MetaData "SourcePos" "Text.Megaparsec.Pos" "megaparsec-9.7.0-9IxnAL1Z5n8HX9bf04jh9I" '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)))) |