plutus-core-1.0.0.1: Language library for Plutus Core
Safe Haskell None
Language Haskell2010

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

NFData ParseError Source #
Instance details

Defined in PlutusCore.Error

ShowErrorComponent ParseError Source #
Instance details

Defined in PlutusCore.Error

Pretty ParseError Source #
Instance details

Defined in PlutusCore.Error

HasErrorCode 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

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

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

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 #

Instances

Instances details
Functor UniqueError Source #
Instance details

Defined in PlutusCore.Error

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

Defined in PlutusCore.Error

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 #

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

Defined in PlutusCore.Error

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

Defined in PlutusCore.Error

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

data TypeError term uni fun ann Source #

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

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

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

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

Defined in PlutusCore.Error

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-76bWF9ZEWyb4eDyjHx0kCS" ' 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

Instances

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

Defined in PlutusCore.Error

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

Defined in PlutusIR.Error

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

Defined in PlutusCore.Error

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

Exception FreeVariableError Source #
Instance details

Defined in PlutusCore.DeBruijn.Internal

NFData FreeVariableError Source #
Instance details

Defined in PlutusCore.DeBruijn.Internal

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

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

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

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

AsFreeVariableError ( Error uni fun ann) Source #
Instance details

Defined in PlutusCore.Error

AsParseError ( Error uni fun ann) Source #
Instance details

Defined in PlutusCore.Error

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

Defined in PlutusCore.Error

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

Defined in PlutusCore.Error

(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

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

Defined in PlutusCore.Error

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