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

PlutusCore.Error

Synopsis

Documentation

data ParseError ann Source #

An error encountered during parsing.

Instances

Instances details
Functor ParseError Source # 
Instance details

Defined in PlutusCore.Error

Methods

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

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

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

Defined in PlutusCore.Error

Methods

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

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

Ord ann => Ord (ParseError ann) Source # 
Instance details

Defined in PlutusCore.Error

Pretty ann => Show (ParseError ann) Source # 
Instance details

Defined in PlutusCore.Error

Generic (ParseError ann) Source # 
Instance details

Defined in PlutusCore.Error

Associated Types

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

Methods

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

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

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

Defined in PlutusCore.Error

Methods

rnf :: ParseError ann -> () Source #

(Ord ann, Pretty ann) => ShowErrorComponent (ParseError ann) Source # 
Instance details

Defined in PlutusCore.ParserCommon

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

Defined in PlutusCore.Error

Methods

pretty :: ParseError ann -> Doc ann0 Source #

prettyList :: [ParseError ann] -> Doc ann0 Source #

HasErrorCode (ParseError _a) Source # 
Instance details

Defined in PlutusCore.Error

AsParseError (ParseError ann) ann Source # 
Instance details

Defined in PlutusCore.Error

type Rep (ParseError ann) Source # 
Instance details

Defined in PlutusCore.Error

type Rep (ParseError ann)

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

Minimal complete definition

_ParseError

Instances

Instances details
AsParseError (ParseError ann) ann Source # 
Instance details

Defined in PlutusCore.Error

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

Defined in PlutusCore.Error

Methods

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

_LexErr :: Prism' (Error uni fun ann) String Source #

_Unexpected :: Prism' (Error uni fun ann) (Token ann) Source #

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

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

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

_InvalidBuiltinConstant :: Prism' (Error uni fun ann) (ann, Text, Text) 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 Source #

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

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 Source #

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

HasErrorCode (UniqueError _a) Source # 
Instance details

Defined in PlutusCore.Error

AsUniqueError (UniqueError ann) ann Source # 
Instance details

Defined in PlutusCore.Error

type Rep (UniqueError ann) Source # 
Instance details

Defined in PlutusCore.Error

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

Minimal complete definition

_UniqueError

Instances

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

Defined in PlutusCore.Error

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 Source #

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

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-0.1.0.0-75cTOscXcmAHq1cwUst1Y0" '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-0.1.0.0-75cTOscXcmAHq1cwUst1Y0" '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)))

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 Source #

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

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 ann)) => 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

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

Defined in PlutusCore.Error

Methods

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

_LexErr :: Prism' (Error uni fun ann) String Source #

_Unexpected :: Prism' (Error uni fun ann) (Token ann) Source #

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

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

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

_InvalidBuiltinConstant :: Prism' (Error uni fun ann) (ann, Text, Text) 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 ann) 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-0.1.0.0-75cTOscXcmAHq1cwUst1Y0" 'False) ((C1 ('MetaCons "ParseErrorE" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ParseError ann))) :+: 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

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 ann) 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.

Orphan instances

Pretty SourcePos Source # 
Instance details

Methods

pretty :: SourcePos -> Doc ann Source #

prettyList :: [SourcePos] -> Doc ann Source #