Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
PlutusTx.Compiler.Error
Synopsis
- type CompileError uni fun ann = WithContext Text (Error uni fun ann)
- data Error uni fun a
- = PLCError !(Error uni fun a)
- | PIRError !(Error uni fun (Provenance a))
- | CompilationError !Text
- | UnsupportedError !Text
- | FreeVariableError !Text
- | InvalidMarkerError !String
- | CoreNameLookupError !Name
- data WithContext c e
- = NoContext e
- | WithContextC Int c (WithContext c e)
- withContext ∷ MonadError (WithContext c e) m ⇒ Int → c → m a → m a
- withContextM ∷ MonadError (WithContext c e) m ⇒ Int → m c → m a → m a
- throwPlain ∷ MonadError (WithContext c e) m ⇒ e → m a
- pruneContext ∷ Int → WithContext c e → WithContext c e
Documentation
type CompileError uni fun ann = WithContext Text (Error uni fun ann) Source #
Constructors
PLCError !(Error uni fun a) | |
PIRError !(Error uni fun (Provenance a)) | |
CompilationError !Text | |
UnsupportedError !Text | |
FreeVariableError !Text | |
InvalidMarkerError !String | |
CoreNameLookupError !Name |
Instances
(PrettyUni uni, Pretty fun, Pretty a) ⇒ PrettyBy PrettyConfigPlc (Error uni fun a) Source # | |
Defined in PlutusTx.Compiler.Error Methods prettyBy ∷ PrettyConfigPlc → Error uni fun a → Doc ann Source # prettyListBy ∷ PrettyConfigPlc → [Error uni fun a] → Doc ann Source # | |
(PrettyUni uni, Pretty fun, Pretty a) ⇒ Pretty (Error uni fun a) Source # | |
data WithContext c e Source #
An error with some (nested) context. The integer argument to WithContextC
represents
the priority of the context when displaying it. Lower numbers are more prioritised.
Constructors
NoContext e | |
WithContextC Int c (WithContext c e) |
Instances
Functor (WithContext c) Source # | |
Defined in PlutusTx.Compiler.Error Methods fmap ∷ (a → b) → WithContext c a → WithContext c b Source # (<$) ∷ a → WithContext c b → WithContext c a Source # | |
(Pretty c, Pretty e) ⇒ Pretty (WithContext c e) Source # | |
Defined in PlutusTx.Compiler.Error |
withContext ∷ MonadError (WithContext c e) m ⇒ Int → c → m a → m a Source #
withContextM ∷ MonadError (WithContext c e) m ⇒ Int → m c → m a → m a Source #
throwPlain ∷ MonadError (WithContext c e) m ⇒ e → m a Source #
pruneContext ∷ Int → WithContext c e → WithContext c e Source #