plutus-core-1.0.0.1: Language library for Plutus Core
Safe HaskellNone
LanguageHaskell2010

PlutusCore.Error

Synopsis

Documentation

data ParseError Source #

An error encountered during parsing.

Instances

Instances details
Eq ParseError Source # 
Instance details

Defined in PlutusCore.Error

Ord ParseError Source # 
Instance details

Defined in PlutusCore.Error

Show ParseError Source # 
Instance details

Defined in PlutusCore.Error

Generic ParseError Source # 
Instance details

Defined in PlutusCore.Error

Associated Types

type Rep ParseError :: Type -> Type Source #

NFData ParseError Source # 
Instance details

Defined in PlutusCore.Error

Methods

rnf :: ParseError -> () Source #

Pretty ParseError Source # 
Instance details

Defined in PlutusCore.Error

Methods

pretty :: ParseError -> Doc ann #

prettyList :: [ParseError] -> Doc ann #

HasErrorCode ParseError Source # 
Instance details

Defined in PlutusCore.Error

ShowErrorComponent ParseError Source # 
Instance details

Defined in PlutusCore.Error

AsParseError ParseError Source # 
Instance details

Defined in PlutusCore.Error

type Rep ParseError Source # 
Instance details

Defined in PlutusCore.Error

class AsParseError r where Source #

Minimal complete definition

_ParseError

Methods

_ParseError :: Prism' r ParseError Source #

_UnknownBuiltinType :: Prism' r (Text, SourcePos) Source #

_BuiltinTypeNotAStar :: Prism' r (Text, SourcePos) Source #

_UnknownBuiltinFunction :: Prism' r (Text, SourcePos) Source #

_InvalidBuiltinConstant :: Prism' r (Text, Text, SourcePos) Source #

Instances

Instances details
AsParseError ParseError Source # 
Instance details

Defined in PlutusCore.Error

AsParseError (Error uni fun ann) Source # 
Instance details

Defined in PlutusCore.Error

Methods

_ParseError :: Prism' (Error uni fun ann) ParseError Source #

_UnknownBuiltinType :: Prism' (Error uni fun ann) (Text, SourcePos) Source #

_BuiltinTypeNotAStar :: Prism' (Error uni fun ann) (Text, SourcePos) Source #

_UnknownBuiltinFunction :: Prism' (Error uni fun ann) (Text, SourcePos) Source #

_InvalidBuiltinConstant :: Prism' (Error uni fun ann) (Text, Text, SourcePos) Source #

data NormCheckError tyname name uni fun ann Source #

Constructors

BadType ann (Type tyname uni ann) Text 
BadTerm ann (Term tyname name uni fun ann) Text 

Instances

Instances details
(Pretty ann, PrettyBy config (Type tyname uni ann), PrettyBy config (Term tyname name uni fun ann)) => PrettyBy config (NormCheckError tyname name uni fun ann) Source # 
Instance details

Defined in PlutusCore.Error

Methods

prettyBy :: config -> NormCheckError tyname name uni fun ann -> Doc ann0 #

prettyListBy :: config -> [NormCheckError tyname name uni fun ann] -> Doc ann0 #

Functor (NormCheckError tyname name uni fun) Source # 
Instance details

Defined in PlutusCore.Error

Methods

fmap :: (a -> b) -> NormCheckError tyname name uni fun a -> NormCheckError tyname name uni fun b Source #

(<$) :: a -> NormCheckError tyname name uni fun b -> NormCheckError tyname name uni fun a Source #

(Eq (Term tyname name uni fun ann), Eq (Type tyname uni ann), GEq uni, Closed uni, Everywhere uni Eq, Eq fun, Eq ann) => Eq (NormCheckError tyname name uni fun ann) Source # 
Instance details

Defined in PlutusCore.Error

Methods

(==) :: NormCheckError tyname name uni fun ann -> NormCheckError tyname name uni fun ann -> Bool Source #

(/=) :: NormCheckError tyname name uni fun ann -> NormCheckError tyname name uni fun ann -> Bool Source #

(Everywhere uni Show, GShow uni, Closed uni, Show ann, Show tyname, Show name, Show fun) => Show (NormCheckError tyname name uni fun ann) Source # 
Instance details

Defined in PlutusCore.Error

Methods

showsPrec :: Int -> NormCheckError tyname name uni fun ann -> ShowS Source #

show :: NormCheckError tyname name uni fun ann -> String Source #

showList :: [NormCheckError tyname name uni fun ann] -> ShowS Source #

Generic (NormCheckError tyname name uni fun ann) Source # 
Instance details

Defined in PlutusCore.Error

Associated Types

type Rep (NormCheckError tyname name uni fun ann) :: Type -> Type Source #

Methods

from :: NormCheckError tyname name uni fun ann -> Rep (NormCheckError tyname name uni fun ann) x Source #

to :: Rep (NormCheckError tyname name uni fun ann) x -> NormCheckError tyname name uni fun ann Source #

(Everywhere uni NFData, Closed uni, NFData ann, NFData tyname, NFData name, NFData fun) => NFData (NormCheckError tyname name uni fun ann) Source # 
Instance details

Defined in PlutusCore.Error

Methods

rnf :: NormCheckError tyname name uni fun ann -> () Source #

HasErrorCode (NormCheckError _a _b _c _d _e) Source # 
Instance details

Defined in PlutusCore.Error

Methods

errorCode :: NormCheckError _a _b _c _d _e -> ErrorCode Source #

AsNormCheckError (NormCheckError tyname name uni fun ann) tyname name uni fun ann Source # 
Instance details

Defined in PlutusCore.Error

Methods

_NormCheckError :: Prism' (NormCheckError tyname name uni fun ann) (NormCheckError tyname name uni fun ann) Source #

_BadType :: Prism' (NormCheckError tyname name uni fun ann) (ann, Type tyname uni ann, Text) Source #

_BadTerm :: Prism' (NormCheckError tyname name uni fun ann) (ann, Term tyname name uni fun ann, Text) Source #

type Rep (NormCheckError tyname name uni fun ann) Source # 
Instance details

Defined in PlutusCore.Error

class AsNormCheckError r tyname name uni fun ann | r -> tyname name uni fun ann where Source #

Minimal complete definition

_NormCheckError

Methods

_NormCheckError :: Prism' r (NormCheckError tyname name uni fun ann) Source #

_BadType :: Prism' r (ann, Type tyname uni ann, Text) Source #

_BadTerm :: Prism' r (ann, Term tyname name uni fun ann, Text) Source #

Instances

Instances details
(tyname ~ TyName, name ~ Name) => AsNormCheckError (Error uni fun ann) tyname name uni fun ann Source # 
Instance details

Defined in PlutusCore.Error

Methods

_NormCheckError :: Prism' (Error uni fun ann) (NormCheckError tyname name uni fun ann) Source #

_BadType :: Prism' (Error uni fun ann) (ann, Type tyname uni ann, Text) Source #

_BadTerm :: Prism' (Error uni fun ann) (ann, Term tyname name uni fun ann, Text) Source #

AsNormCheckError (NormCheckError tyname name uni fun ann) tyname name uni fun ann Source # 
Instance details

Defined in PlutusCore.Error

Methods

_NormCheckError :: Prism' (NormCheckError tyname name uni fun ann) (NormCheckError tyname name uni fun ann) Source #

_BadType :: Prism' (NormCheckError tyname name uni fun ann) (ann, Type tyname uni ann, Text) Source #

_BadTerm :: Prism' (NormCheckError tyname name uni fun ann) (ann, Term tyname name uni fun ann, Text) Source #

data UniqueError ann Source #

Constructors

MultiplyDefined Unique ann ann 
IncoherentUsage Unique ann ann 
FreeVariable Unique ann 

Instances

Instances details
Functor UniqueError Source # 
Instance details

Defined in PlutusCore.Error

Methods

fmap :: (a -> b) -> UniqueError a -> UniqueError b Source #

(<$) :: a -> UniqueError b -> UniqueError a Source #

Eq ann => Eq (UniqueError ann) Source # 
Instance details

Defined in PlutusCore.Error

Methods

(==) :: UniqueError ann -> UniqueError ann -> Bool Source #

(/=) :: UniqueError ann -> UniqueError ann -> Bool Source #

Show ann => Show (UniqueError ann) Source # 
Instance details

Defined in PlutusCore.Error

Generic (UniqueError ann) Source # 
Instance details

Defined in PlutusCore.Error

Associated Types

type Rep (UniqueError ann) :: Type -> Type Source #

Methods

from :: UniqueError ann -> Rep (UniqueError ann) x Source #

to :: Rep (UniqueError ann) x -> UniqueError ann Source #

NFData ann => NFData (UniqueError ann) Source # 
Instance details

Defined in PlutusCore.Error

Methods

rnf :: UniqueError ann -> () Source #

Pretty ann => Pretty (UniqueError ann) Source # 
Instance details

Defined in PlutusCore.Error

Methods

pretty :: UniqueError ann -> Doc ann0 #

prettyList :: [UniqueError ann] -> Doc ann0 #

HasErrorCode (UniqueError _a) Source # 
Instance details

Defined in PlutusCore.Error

AsUniqueError (UniqueError ann) ann Source # 
Instance details

Defined in PlutusCore.Error

Methods

_UniqueError :: Prism' (UniqueError ann) (UniqueError ann) Source #

_MultiplyDefined :: Prism' (UniqueError ann) (Unique, ann, ann) Source #

_IncoherentUsage :: Prism' (UniqueError ann) (Unique, ann, ann) Source #

_FreeVariable :: Prism' (UniqueError ann) (Unique, ann) Source #

type Rep (UniqueError ann) Source # 
Instance details

Defined in PlutusCore.Error

class AsUniqueError r ann | r -> ann where Source #

Minimal complete definition

_UniqueError

Methods

_UniqueError :: Prism' r (UniqueError ann) Source #

_MultiplyDefined :: Prism' r (Unique, ann, ann) Source #

_IncoherentUsage :: Prism' r (Unique, ann, ann) Source #

_FreeVariable :: Prism' r (Unique, ann) Source #

Instances

Instances details
AsUniqueError (UniqueError ann) ann Source # 
Instance details

Defined in PlutusCore.Error

Methods

_UniqueError :: Prism' (UniqueError ann) (UniqueError ann) Source #

_MultiplyDefined :: Prism' (UniqueError ann) (Unique, ann, ann) Source #

_IncoherentUsage :: Prism' (UniqueError ann) (Unique, ann, ann) Source #

_FreeVariable :: Prism' (UniqueError ann) (Unique, ann) Source #

AsUniqueError (Error uni fun ann) ann Source # 
Instance details

Defined in PlutusCore.Error

Methods

_UniqueError :: Prism' (Error uni fun ann) (UniqueError ann) Source #

_MultiplyDefined :: Prism' (Error uni fun ann) (Unique, ann, ann) Source #

_IncoherentUsage :: Prism' (Error uni fun ann) (Unique, ann, ann) Source #

_FreeVariable :: Prism' (Error uni fun ann) (Unique, ann) Source #

data TypeError term uni fun ann Source #

Constructors

KindMismatch ann (Type TyName uni ()) (Kind ()) (Kind ()) 
TypeMismatch ann term (Type TyName uni ()) (Normalized (Type TyName uni ())) 
FreeTypeVariableE ann TyName 
FreeVariableE ann Name 
UnknownBuiltinFunctionE ann fun 

Instances

Instances details
(GShow uni, Closed uni, Everywhere uni PrettyConst, Pretty ann, Pretty fun, Pretty term) => PrettyBy PrettyConfigPlc (TypeError term uni fun ann) Source # 
Instance details

Defined in PlutusCore.Error

Methods

prettyBy :: PrettyConfigPlc -> TypeError term uni fun ann -> Doc ann0 #

prettyListBy :: PrettyConfigPlc -> [TypeError term uni fun ann] -> Doc ann0 #

Functor (TypeError term uni fun) Source # 
Instance details

Defined in PlutusCore.Error

Methods

fmap :: (a -> b) -> TypeError term uni fun a -> TypeError term uni fun b Source #

(<$) :: a -> TypeError term uni fun b -> TypeError term uni fun a Source #

(GEq uni, Eq ann, Eq term, Eq fun) => Eq (TypeError term uni fun ann) Source # 
Instance details

Defined in PlutusCore.Error

Methods

(==) :: TypeError term uni fun ann -> TypeError term uni fun ann -> Bool Source #

(/=) :: TypeError term uni fun ann -> TypeError term uni fun ann -> Bool Source #

(GShow uni, Show ann, Show term, Show fun) => Show (TypeError term uni fun ann) Source # 
Instance details

Defined in PlutusCore.Error

Methods

showsPrec :: Int -> TypeError term uni fun ann -> ShowS Source #

show :: TypeError term uni fun ann -> String Source #

showList :: [TypeError term uni fun ann] -> ShowS Source #

Generic (TypeError term uni fun ann) Source # 
Instance details

Defined in PlutusCore.Error

Associated Types

type Rep (TypeError term uni fun ann) :: Type -> Type Source #

Methods

from :: TypeError term uni fun ann -> Rep (TypeError term uni fun ann) x Source #

to :: Rep (TypeError term uni fun ann) x -> TypeError term uni fun ann Source #

(Closed uni, NFData ann, NFData term, NFData fun) => NFData (TypeError term uni fun ann) Source # 
Instance details

Defined in PlutusCore.Error

Methods

rnf :: TypeError term uni fun ann -> () Source #

HasErrorCode (TypeError _a _b _c _d) Source # 
Instance details

Defined in PlutusCore.Error

Methods

errorCode :: TypeError _a _b _c _d -> ErrorCode Source #

AsTypeError (TypeError term uni fun ann) term uni fun ann Source # 
Instance details

Defined in PlutusCore.Error

Methods

_TypeError :: Prism' (TypeError term uni fun ann) (TypeError term uni fun ann) Source #

_KindMismatch :: Prism' (TypeError term uni fun ann) (ann, Type TyName uni (), Kind (), Kind ()) Source #

_TypeMismatch :: Prism' (TypeError term uni fun ann) (ann, term, Type TyName uni (), Normalized (Type TyName uni ())) Source #

_FreeTypeVariableE :: Prism' (TypeError term uni fun ann) (ann, TyName) Source #

_FreeVariableE :: Prism' (TypeError term uni fun ann) (ann, Name) Source #

_UnknownBuiltinFunctionE :: Prism' (TypeError term uni fun ann) (ann, fun) Source #

type Rep (TypeError term uni fun ann) Source # 
Instance details

Defined in PlutusCore.Error

type Rep (TypeError term uni fun ann) = D1 ('MetaData "TypeError" "PlutusCore.Error" "plutus-core-1.0.0.1-6wMiyL0yerXJu56t8zBoKx" 'False) ((C1 ('MetaCons "KindMismatch" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ann) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type TyName uni ()))) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Kind ())) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Kind ())))) :+: C1 ('MetaCons "TypeMismatch" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ann) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 term)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type TyName uni ())) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Normalized (Type TyName uni ())))))) :+: (C1 ('MetaCons "FreeTypeVariableE" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ann) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TyName)) :+: (C1 ('MetaCons "FreeVariableE" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ann) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name)) :+: C1 ('MetaCons "UnknownBuiltinFunctionE" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ann) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 fun)))))

class AsTypeError r term uni fun ann | r -> term uni fun ann where Source #

Minimal complete definition

_TypeError

Methods

_TypeError :: Prism' r (TypeError term uni fun ann) Source #

_KindMismatch :: Prism' r (ann, Type TyName uni (), Kind (), Kind ()) Source #

_TypeMismatch :: Prism' r (ann, term, Type TyName uni (), Normalized (Type TyName uni ())) Source #

_FreeTypeVariableE :: Prism' r (ann, TyName) Source #

_FreeVariableE :: Prism' r (ann, Name) Source #

_UnknownBuiltinFunctionE :: Prism' r (ann, fun) Source #

Instances

Instances details
AsTypeError (Error uni fun ann) (Term TyName Name uni fun ()) uni fun ann Source # 
Instance details

Defined in PlutusCore.Error

Methods

_TypeError :: Prism' (Error uni fun ann) (TypeError (Term TyName Name uni fun ()) uni fun ann) Source #

_KindMismatch :: Prism' (Error uni fun ann) (ann, Type TyName uni (), Kind (), Kind ()) Source #

_TypeMismatch :: Prism' (Error uni fun ann) (ann, Term TyName Name uni fun (), Type TyName uni (), Normalized (Type TyName uni ())) Source #

_FreeTypeVariableE :: Prism' (Error uni fun ann) (ann, TyName) Source #

_FreeVariableE :: Prism' (Error uni fun ann) (ann, Name) Source #

_UnknownBuiltinFunctionE :: Prism' (Error uni fun ann) (ann, fun) Source #

AsTypeError (Error uni fun a) (Term TyName Name uni fun ()) uni fun a Source # 
Instance details

Defined in PlutusIR.Error

Methods

_TypeError :: Prism' (Error uni fun a) (TypeError (Term TyName Name uni fun ()) uni fun a) Source #

_KindMismatch :: Prism' (Error uni fun a) (a, Type TyName uni (), Kind (), Kind ()) Source #

_TypeMismatch :: Prism' (Error uni fun a) (a, Term TyName Name uni fun (), Type TyName uni (), Normalized (Type TyName uni ())) Source #

_FreeTypeVariableE :: Prism' (Error uni fun a) (a, TyName) Source #

_FreeVariableE :: Prism' (Error uni fun a) (a, Name) Source #

_UnknownBuiltinFunctionE :: Prism' (Error uni fun a) (a, fun) Source #

AsTypeError (TypeError term uni fun ann) term uni fun ann Source # 
Instance details

Defined in PlutusCore.Error

Methods

_TypeError :: Prism' (TypeError term uni fun ann) (TypeError term uni fun ann) Source #

_KindMismatch :: Prism' (TypeError term uni fun ann) (ann, Type TyName uni (), Kind (), Kind ()) Source #

_TypeMismatch :: Prism' (TypeError term uni fun ann) (ann, term, Type TyName uni (), Normalized (Type TyName uni ())) Source #

_FreeTypeVariableE :: Prism' (TypeError term uni fun ann) (ann, TyName) Source #

_FreeVariableE :: Prism' (TypeError term uni fun ann) (ann, Name) Source #

_UnknownBuiltinFunctionE :: Prism' (TypeError term uni fun ann) (ann, fun) Source #

data FreeVariableError Source #

We cannot do a correct translation to or from de Bruijn indices if the program is not well-scoped. So we throw an error in such a case.

Instances

Instances details
Eq FreeVariableError Source # 
Instance details

Defined in PlutusCore.DeBruijn.Internal

Ord FreeVariableError Source # 
Instance details

Defined in PlutusCore.DeBruijn.Internal

Show FreeVariableError Source # 
Instance details

Defined in PlutusCore.DeBruijn.Internal

Generic FreeVariableError Source # 
Instance details

Defined in PlutusCore.DeBruijn.Internal

Associated Types

type Rep FreeVariableError :: Type -> Type Source #

Exception FreeVariableError Source # 
Instance details

Defined in PlutusCore.DeBruijn.Internal

NFData FreeVariableError Source # 
Instance details

Defined in PlutusCore.DeBruijn.Internal

Methods

rnf :: FreeVariableError -> () Source #

Pretty FreeVariableError Source # 
Instance details

Defined in PlutusCore.DeBruijn.Internal

HasErrorCode FreeVariableError Source # 
Instance details

Defined in PlutusCore.DeBruijn.Internal

AsFreeVariableError FreeVariableError Source # 
Instance details

Defined in PlutusCore.DeBruijn.Internal

type Rep FreeVariableError Source # 
Instance details

Defined in PlutusCore.DeBruijn.Internal

type Rep FreeVariableError = D1 ('MetaData "FreeVariableError" "PlutusCore.DeBruijn.Internal" "plutus-core-1.0.0.1-6wMiyL0yerXJu56t8zBoKx" 'False) (C1 ('MetaCons "FreeUnique" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Unique)) :+: C1 ('MetaCons "FreeIndex" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Index)))

class AsFreeVariableError r where Source #

Minimal complete definition

_FreeVariableError

Instances

Instances details
AsFreeVariableError FreeVariableError Source # 
Instance details

Defined in PlutusCore.DeBruijn.Internal

AsFreeVariableError (Error uni fun ann) Source # 
Instance details

Defined in PlutusCore.Error

Methods

_FreeVariableError :: Prism' (Error uni fun ann) FreeVariableError Source #

_FreeUnique :: Prism' (Error uni fun ann) Unique Source #

_FreeIndex :: Prism' (Error uni fun ann) Index Source #

AsFreeVariableError (Error uni fun a) Source # 
Instance details

Defined in PlutusIR.Error

Methods

_FreeVariableError :: Prism' (Error uni fun a) FreeVariableError Source #

_FreeUnique :: Prism' (Error uni fun a) Unique Source #

_FreeIndex :: Prism' (Error uni fun a) Index Source #

data Error uni fun ann Source #

Instances

Instances details
(GShow uni, Closed uni, Everywhere uni PrettyConst, Pretty fun, Pretty ann) => PrettyBy PrettyConfigPlc (Error uni fun ann) Source # 
Instance details

Defined in PlutusCore.Error

Methods

prettyBy :: PrettyConfigPlc -> Error uni fun ann -> Doc ann0 #

prettyListBy :: PrettyConfigPlc -> [Error uni fun ann] -> Doc ann0 #

Functor (Error uni fun) Source # 
Instance details

Defined in PlutusCore.Error

Methods

fmap :: (a -> b) -> Error uni fun a -> Error uni fun b Source #

(<$) :: a -> Error uni fun b -> Error uni fun a Source #

(Everywhere uni Eq, GEq uni, Closed uni, Eq ann, Eq fun) => Eq (Error uni fun ann) Source # 
Instance details

Defined in PlutusCore.Error

Methods

(==) :: Error uni fun ann -> Error uni fun ann -> Bool Source #

(/=) :: Error uni fun ann -> Error uni fun ann -> Bool Source #

(Show fun, Show ann, Closed uni, Everywhere uni Show, GShow uni, Show ParseError) => Show (Error uni fun ann) Source # 
Instance details

Defined in PlutusCore.Error

Methods

showsPrec :: Int -> Error uni fun ann -> ShowS Source #

show :: Error uni fun ann -> String Source #

showList :: [Error uni fun ann] -> ShowS Source #

Generic (Error uni fun ann) Source # 
Instance details

Defined in PlutusCore.Error

Associated Types

type Rep (Error uni fun ann) :: Type -> Type Source #

Methods

from :: Error uni fun ann -> Rep (Error uni fun ann) x Source #

to :: Rep (Error uni fun ann) x -> Error uni fun ann Source #

(Everywhere uni NFData, Closed uni, NFData ann, NFData fun) => NFData (Error uni fun ann) Source # 
Instance details

Defined in PlutusCore.Error

Methods

rnf :: Error uni fun ann -> () Source #

HasErrorCode (Error _a _b _c) Source # 
Instance details

Defined in PlutusCore.Error

Methods

errorCode :: Error _a _b _c -> ErrorCode Source #

AsFreeVariableError (Error uni fun ann) Source # 
Instance details

Defined in PlutusCore.Error

Methods

_FreeVariableError :: Prism' (Error uni fun ann) FreeVariableError Source #

_FreeUnique :: Prism' (Error uni fun ann) Unique Source #

_FreeIndex :: Prism' (Error uni fun ann) Index Source #

AsParseError (Error uni fun ann) Source # 
Instance details

Defined in PlutusCore.Error

Methods

_ParseError :: Prism' (Error uni fun ann) ParseError Source #

_UnknownBuiltinType :: Prism' (Error uni fun ann) (Text, SourcePos) Source #

_BuiltinTypeNotAStar :: Prism' (Error uni fun ann) (Text, SourcePos) Source #

_UnknownBuiltinFunction :: Prism' (Error uni fun ann) (Text, SourcePos) Source #

_InvalidBuiltinConstant :: Prism' (Error uni fun ann) (Text, Text, SourcePos) Source #

AsUniqueError (Error uni fun ann) ann Source # 
Instance details

Defined in PlutusCore.Error

Methods

_UniqueError :: Prism' (Error uni fun ann) (UniqueError ann) Source #

_MultiplyDefined :: Prism' (Error uni fun ann) (Unique, ann, ann) Source #

_IncoherentUsage :: Prism' (Error uni fun ann) (Unique, ann, ann) Source #

_FreeVariable :: Prism' (Error uni fun ann) (Unique, ann) Source #

AsError (Error uni fun ann) uni fun ann Source # 
Instance details

Defined in PlutusCore.Error

Methods

_Error :: Prism' (Error uni fun ann) (Error uni fun ann) Source #

_ParseErrorE :: Prism' (Error uni fun ann) ParseError Source #

_UniqueCoherencyErrorE :: Prism' (Error uni fun ann) (UniqueError ann) Source #

_TypeErrorE :: Prism' (Error uni fun ann) (TypeError (Term TyName Name uni fun ()) uni fun ann) Source #

_NormCheckErrorE :: Prism' (Error uni fun ann) (NormCheckError TyName Name uni fun ann) Source #

_FreeVariableErrorE :: Prism' (Error uni fun ann) FreeVariableError Source #

(tyname ~ TyName, name ~ Name) => AsNormCheckError (Error uni fun ann) tyname name uni fun ann Source # 
Instance details

Defined in PlutusCore.Error

Methods

_NormCheckError :: Prism' (Error uni fun ann) (NormCheckError tyname name uni fun ann) Source #

_BadType :: Prism' (Error uni fun ann) (ann, Type tyname uni ann, Text) Source #

_BadTerm :: Prism' (Error uni fun ann) (ann, Term tyname name uni fun ann, Text) Source #

AsTypeError (Error uni fun ann) (Term TyName Name uni fun ()) uni fun ann Source # 
Instance details

Defined in PlutusCore.Error

Methods

_TypeError :: Prism' (Error uni fun ann) (TypeError (Term TyName Name uni fun ()) uni fun ann) Source #

_KindMismatch :: Prism' (Error uni fun ann) (ann, Type TyName uni (), Kind (), Kind ()) Source #

_TypeMismatch :: Prism' (Error uni fun ann) (ann, Term TyName Name uni fun (), Type TyName uni (), Normalized (Type TyName uni ())) Source #

_FreeTypeVariableE :: Prism' (Error uni fun ann) (ann, TyName) Source #

_FreeVariableE :: Prism' (Error uni fun ann) (ann, Name) Source #

_UnknownBuiltinFunctionE :: Prism' (Error uni fun ann) (ann, fun) Source #

type Rep (Error uni fun ann) Source # 
Instance details

Defined in PlutusCore.Error

type Rep (Error uni fun ann) = D1 ('MetaData "Error" "PlutusCore.Error" "plutus-core-1.0.0.1-6wMiyL0yerXJu56t8zBoKx" 'False) ((C1 ('MetaCons "ParseErrorE" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ParseError)) :+: C1 ('MetaCons "UniqueCoherencyErrorE" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (UniqueError ann)))) :+: (C1 ('MetaCons "TypeErrorE" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (TypeError (Term TyName Name uni fun ()) uni fun ann))) :+: (C1 ('MetaCons "NormCheckErrorE" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NormCheckError TyName Name uni fun ann))) :+: C1 ('MetaCons "FreeVariableErrorE" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FreeVariableError)))))

class AsError r uni fun ann | r -> uni fun ann where Source #

Minimal complete definition

_Error

Methods

_Error :: Prism' r (Error uni fun ann) Source #

_ParseErrorE :: Prism' r ParseError Source #

_UniqueCoherencyErrorE :: Prism' r (UniqueError ann) Source #

_TypeErrorE :: Prism' r (TypeError (Term TyName Name uni fun ()) uni fun ann) Source #

_NormCheckErrorE :: Prism' r (NormCheckError TyName Name uni fun ann) Source #

_FreeVariableErrorE :: Prism' r FreeVariableError Source #

Instances

Instances details
AsError (Error uni fun ann) uni fun ann Source # 
Instance details

Defined in PlutusCore.Error

Methods

_Error :: Prism' (Error uni fun ann) (Error uni fun ann) Source #

_ParseErrorE :: Prism' (Error uni fun ann) ParseError Source #

_UniqueCoherencyErrorE :: Prism' (Error uni fun ann) (UniqueError ann) Source #

_TypeErrorE :: Prism' (Error uni fun ann) (TypeError (Term TyName Name uni fun ()) uni fun ann) Source #

_NormCheckErrorE :: Prism' (Error uni fun ann) (NormCheckError TyName Name uni fun ann) Source #

_FreeVariableErrorE :: Prism' (Error uni fun ann) FreeVariableError Source #

throwingEither :: MonadError e m => AReview e t -> Either t a -> m a Source #

Lifts an Either into an error context where we can embed the Left value into the error.

class Ord a => ShowErrorComponent a where #

Methods

showErrorComponent :: a -> String #

Orphan instances

Pretty SourcePos Source # 
Instance details

Methods

pretty :: SourcePos -> Doc ann #

prettyList :: [SourcePos] -> Doc ann #