plutus-tx-plugin-1.34.1.0: The Plutus Tx compiler and GHC plugin
Safe HaskellSafe-Inferred
LanguageHaskell2010

PlutusTx.Compiler.Error

Synopsis

Documentation

type CompileError uni fun ann = WithContext Text (Error uni fun ann) Source #

data Error uni fun a Source #

Instances

Instances details
(PrettyUni uni, Pretty fun, Pretty a) ⇒ PrettyBy PrettyConfigPlc (Error uni fun a) Source # 
Instance details

Defined in PlutusTx.Compiler.Error

Methods

prettyByPrettyConfigPlcError uni fun a → Doc ann Source #

prettyListByPrettyConfigPlc → [Error uni fun a] → Doc ann Source #

(PrettyUni uni, Pretty fun, Pretty a) ⇒ Pretty (Error uni fun a) Source # 
Instance details

Defined in PlutusTx.Compiler.Error

Methods

prettyError uni fun a → Doc ann Source #

prettyList ∷ [Error uni fun a] → Doc ann Source #

AsUniqueError (CompileError uni fun a) a Source # 
Instance details

Defined in PlutusTx.Compiler.Error

Methods

_UniqueError ∷ Prism' (CompileError uni fun a) (UniqueError a) Source #

_MultiplyDefined ∷ Prism' (CompileError uni fun a) (Unique, a, a) Source #

_IncoherentUsage ∷ Prism' (CompileError uni fun a) (Unique, a, a) Source #

_FreeVariable ∷ Prism' (CompileError uni fun a) (Unique, a) Source #

(uni1 ~ uni2, b ~ Provenance a) ⇒ AsTypeErrorExt (CompileError uni1 fun a) uni2 b Source # 
Instance details

Defined in PlutusTx.Compiler.Error

Methods

_TypeErrorExt ∷ Prism' (CompileError uni1 fun a) (TypeErrorExt uni2 b) Source #

_MalformedDataConstrResType ∷ Prism' (CompileError uni1 fun a) (b, Type TyName uni2 b) Source #

(uni1 ~ uni2, b ~ Provenance a) ⇒ AsError (CompileError uni1 fun a) uni2 fun b Source # 
Instance details

Defined in PlutusTx.Compiler.Error

Methods

_Error ∷ Prism' (CompileError uni1 fun a) (Error uni2 fun b) Source #

_CompilationError ∷ Prism' (CompileError uni1 fun a) (b, Text) Source #

_UnsupportedError ∷ Prism' (CompileError uni1 fun a) (b, Text) Source #

_OptionsError ∷ Prism' (CompileError uni1 fun a) Text Source #

_PLCError ∷ Prism' (CompileError uni1 fun a) (Error uni2 fun b) Source #

_PLCTypeError ∷ Prism' (CompileError uni1 fun a) (TypeError (Term TyName Name uni2 fun ()) uni2 fun b) Source #

_PIRTypeError ∷ Prism' (CompileError uni1 fun a) (TypeErrorExt uni2 b) Source #

uni1 ~ uni2 ⇒ AsNormCheckError (CompileError uni1 fun a) TyName Name uni2 fun a Source # 
Instance details

Defined in PlutusTx.Compiler.Error

Methods

_NormCheckError ∷ Prism' (CompileError uni1 fun a) (NormCheckError TyName Name uni2 fun a) Source #

_BadType ∷ Prism' (CompileError uni1 fun a) (a, Type TyName uni2 a, Text) Source #

_BadTerm ∷ Prism' (CompileError uni1 fun a) (a, Term TyName Name uni2 fun a, Text) Source #

(uni1 ~ uni2, b ~ Provenance a) ⇒ AsTypeError (CompileError uni1 fun a) (Term TyName Name uni2 fun ()) uni2 fun b Source # 
Instance details

Defined in PlutusTx.Compiler.Error

Methods

_TypeError ∷ Prism' (CompileError uni1 fun a) (TypeError (Term TyName Name uni2 fun ()) uni2 fun b) Source #

_KindMismatch ∷ Prism' (CompileError uni1 fun a) (b, Type TyName uni2 (), ExpectedShapeOr (Kind ()), Kind ()) Source #

_TypeMismatch ∷ Prism' (CompileError uni1 fun a) (b, Term TyName Name uni2 fun (), ExpectedShapeOr (Type TyName uni2 ()), Normalized (Type TyName uni2 ())) Source #

_TyNameMismatch ∷ Prism' (CompileError uni1 fun a) (b, TyName, TyName) Source #

_NameMismatch ∷ Prism' (CompileError uni1 fun a) (b, Name, Name) Source #

_FreeTypeVariableE ∷ Prism' (CompileError uni1 fun a) (b, TyName) Source #

_FreeVariableE ∷ Prism' (CompileError uni1 fun a) (b, Name) Source #

_UnknownBuiltinFunctionE ∷ Prism' (CompileError uni1 fun a) (b, fun) 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

Instances details
Functor (WithContext c) Source # 
Instance details

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 # 
Instance details

Defined in PlutusTx.Compiler.Error

Methods

prettyWithContext c e → Doc ann Source #

prettyList ∷ [WithContext c e] → Doc ann Source #

AsUniqueError (CompileError uni fun a) a Source # 
Instance details

Defined in PlutusTx.Compiler.Error

Methods

_UniqueError ∷ Prism' (CompileError uni fun a) (UniqueError a) Source #

_MultiplyDefined ∷ Prism' (CompileError uni fun a) (Unique, a, a) Source #

_IncoherentUsage ∷ Prism' (CompileError uni fun a) (Unique, a, a) Source #

_FreeVariable ∷ Prism' (CompileError uni fun a) (Unique, a) Source #

(uni1 ~ uni2, b ~ Provenance a) ⇒ AsTypeErrorExt (CompileError uni1 fun a) uni2 b Source # 
Instance details

Defined in PlutusTx.Compiler.Error

Methods

_TypeErrorExt ∷ Prism' (CompileError uni1 fun a) (TypeErrorExt uni2 b) Source #

_MalformedDataConstrResType ∷ Prism' (CompileError uni1 fun a) (b, Type TyName uni2 b) Source #

(uni1 ~ uni2, b ~ Provenance a) ⇒ AsError (CompileError uni1 fun a) uni2 fun b Source # 
Instance details

Defined in PlutusTx.Compiler.Error

Methods

_Error ∷ Prism' (CompileError uni1 fun a) (Error uni2 fun b) Source #

_CompilationError ∷ Prism' (CompileError uni1 fun a) (b, Text) Source #

_UnsupportedError ∷ Prism' (CompileError uni1 fun a) (b, Text) Source #

_OptionsError ∷ Prism' (CompileError uni1 fun a) Text Source #

_PLCError ∷ Prism' (CompileError uni1 fun a) (Error uni2 fun b) Source #

_PLCTypeError ∷ Prism' (CompileError uni1 fun a) (TypeError (Term TyName Name uni2 fun ()) uni2 fun b) Source #

_PIRTypeError ∷ Prism' (CompileError uni1 fun a) (TypeErrorExt uni2 b) Source #

uni1 ~ uni2 ⇒ AsNormCheckError (CompileError uni1 fun a) TyName Name uni2 fun a Source # 
Instance details

Defined in PlutusTx.Compiler.Error

Methods

_NormCheckError ∷ Prism' (CompileError uni1 fun a) (NormCheckError TyName Name uni2 fun a) Source #

_BadType ∷ Prism' (CompileError uni1 fun a) (a, Type TyName uni2 a, Text) Source #

_BadTerm ∷ Prism' (CompileError uni1 fun a) (a, Term TyName Name uni2 fun a, Text) Source #

(uni1 ~ uni2, b ~ Provenance a) ⇒ AsTypeError (CompileError uni1 fun a) (Term TyName Name uni2 fun ()) uni2 fun b Source # 
Instance details

Defined in PlutusTx.Compiler.Error

Methods

_TypeError ∷ Prism' (CompileError uni1 fun a) (TypeError (Term TyName Name uni2 fun ()) uni2 fun b) Source #

_KindMismatch ∷ Prism' (CompileError uni1 fun a) (b, Type TyName uni2 (), ExpectedShapeOr (Kind ()), Kind ()) Source #

_TypeMismatch ∷ Prism' (CompileError uni1 fun a) (b, Term TyName Name uni2 fun (), ExpectedShapeOr (Type TyName uni2 ()), Normalized (Type TyName uni2 ())) Source #

_TyNameMismatch ∷ Prism' (CompileError uni1 fun a) (b, TyName, TyName) Source #

_NameMismatch ∷ Prism' (CompileError uni1 fun a) (b, Name, Name) Source #

_FreeTypeVariableE ∷ Prism' (CompileError uni1 fun a) (b, TyName) Source #

_FreeVariableE ∷ Prism' (CompileError uni1 fun a) (b, Name) Source #

_UnknownBuiltinFunctionE ∷ Prism' (CompileError uni1 fun a) (b, fun) Source #

withContextMonadError (WithContext c e) m ⇒ Int → c → m a → m a Source #

withContextMMonadError (WithContext c e) m ⇒ Int → m c → m a → m a Source #

throwPlainMonadError (WithContext c e) m ⇒ e → m a Source #