Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- module PlutusCore.Executable.Types
- class PrintBudgetState cost
- getInput ∷ Input → IO Text
- getInteresting ∷ IO [(ExampleName, Term TyName Name DefaultUni DefaultFun ())]
- getPlcExamples ∷ IO [(ExampleName, SomeExample)]
- prettyPrintByMode ∷ PrettyPlc a ⇒ PrintMode → a → Doc a
- getUplcExamples ∷ IO [(ExampleName, SomeExample)]
- helpText ∷ String → String
- loadASTfromFlat ∷ (ProgramLike p, Flat ann) ⇒ AstNameType → Input → IO (p ann)
- parseInput ∷ (ProgramLike p, Rename (p SrcSpan)) ⇒ Input → IO (Text, p SrcSpan)
- parseNamedProgram ∷ ProgramLike p ⇒ String → Text → Either ParserErrorBundle (p SrcSpan)
- printBudgetState ∷ PrintBudgetState cost ⇒ Term Name DefaultUni DefaultFun () → CekModel → cost → IO ()
- readProgram ∷ ∀ p. (ProgramLike p, Functor p, Rename (p SrcSpan)) ⇒ Format → Input → IO (p SrcSpan)
- runConvert ∷ ∀ (p ∷ Type → Type). (ProgramLike p, Functor p, Rename (p SrcSpan), PrettyBy PrettyConfigPlc (p SrcSpan)) ⇒ ConvertOptions → IO ()
- runDumpModel ∷ BuiltinSemanticsVariant DefaultFun → IO ()
- runPrint ∷ ∀ p. (ProgramLike p, Rename (p SrcSpan), PrettyBy PrettyConfigPlc (p SrcSpan)) ⇒ PrintOptions → IO ()
- runPrintBuiltinSignatures ∷ IO ()
- runPrintExample ∷ IO [(ExampleName, SomeExample)] → ExampleOptions → IO ()
- topSrcSpan ∷ SrcSpan
- writeFlat ∷ (ProgramLike p, Functor p) ⇒ Output → AstNameType → p ann → IO ()
- writePrettyToOutput ∷ PrettyBy PrettyConfigPlc (p ann) ⇒ Output → PrintMode → p ann → IO ()
- writeProgram ∷ (ProgramLike p, Functor p, PrettyBy PrettyConfigPlc (p ann)) ⇒ Output → Format → PrintMode → p ann → IO ()
- writeToOutput ∷ Show a ⇒ Output → a → IO ()
Documentation
module PlutusCore.Executable.Types
class PrintBudgetState cost Source #
Instances
PrintBudgetState CountingSt Source # | |
Defined in PlutusCore.Executable.Common printBudgetState ∷ Term Name DefaultUni DefaultFun () → CekModel → CountingSt → IO () Source # | |
PrintBudgetState RestrictingSt Source # | |
Defined in PlutusCore.Executable.Common printBudgetState ∷ Term Name DefaultUni DefaultFun () → CekModel → RestrictingSt → IO () Source # | |
(Hashable fun, Show fun) ⇒ PrintBudgetState (TallyingSt fun) Source # | |
Defined in PlutusCore.Executable.Common printBudgetState ∷ Term Name DefaultUni DefaultFun () → CekModel → TallyingSt fun → IO () Source # |
getInteresting ∷ IO [(ExampleName, Term TyName Name DefaultUni DefaultFun ())] Source #
getPlcExamples ∷ IO [(ExampleName, SomeExample)] Source #
Get available typed examples.
getUplcExamples ∷ IO [(ExampleName, SomeExample)] Source #
Get available untyped examples. Currently the untyped examples are obtained by erasing typed ones, but it might be useful to have some untyped ones that can't be obtained by erasure.
loadASTfromFlat ∷ (ProgramLike p, Flat ann) ⇒ AstNameType → Input → IO (p ann) Source #
Read and deserialise a Flat-encoded AST
∷ (ProgramLike p, Rename (p SrcSpan)) | |
⇒ Input | The source program |
→ IO (Text, p SrcSpan) | The output is a program with annotation |
Read and parse and check the program for UniqueError
's.
parseNamedProgram ∷ ProgramLike p ⇒ String → Text → Either ParserErrorBundle (p SrcSpan) Source #
Parse a program. The first argument (normally the file path) describes the input stream, the second is the program text.
printBudgetState ∷ PrintBudgetState cost ⇒ Term Name DefaultUni DefaultFun () → CekModel → cost → IO () Source #
readProgram ∷ ∀ p. (ProgramLike p, Functor p, Rename (p SrcSpan)) ⇒ Format → Input → IO (p SrcSpan) Source #
runConvert ∷ ∀ (p ∷ Type → Type). (ProgramLike p, Functor p, Rename (p SrcSpan), PrettyBy PrettyConfigPlc (p SrcSpan)) ⇒ ConvertOptions → IO () Source #
Convert between textual and FLAT representations.
runPrint ∷ ∀ p. (ProgramLike p, Rename (p SrcSpan), PrettyBy PrettyConfigPlc (p SrcSpan)) ⇒ PrintOptions → IO () Source #
runPrintExample ∷ IO [(ExampleName, SomeExample)] → ExampleOptions → IO () Source #
A made-up SrcSpan
since there's no source locations in Flat.
writePrettyToOutput ∷ PrettyBy PrettyConfigPlc (p ann) ⇒ Output → PrintMode → p ann → IO () Source #
writeProgram ∷ (ProgramLike p, Functor p, PrettyBy PrettyConfigPlc (p ann)) ⇒ Output → Format → PrintMode → p ann → IO () Source #