Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data ParseError
-
class
AsParseError
r
where
- _ParseError :: Prism' r ParseError
- _UnknownBuiltinType :: Prism' r ( Text , SourcePos )
- _BuiltinTypeNotAStar :: Prism' r ( Text , SourcePos )
- _UnknownBuiltinFunction :: Prism' r ( Text , SourcePos )
- _InvalidBuiltinConstant :: Prism' r ( Text , Text , SourcePos )
- data NormCheckError tyname name uni fun ann
- class AsNormCheckError r tyname name uni fun ann | r -> tyname name uni fun ann where
-
data
UniqueError
ann
- = MultiplyDefined Unique ann ann
- | IncoherentUsage Unique ann ann
- | FreeVariable Unique ann
-
class
AsUniqueError
r ann | r -> ann
where
- _UniqueError :: Prism' r ( UniqueError ann)
- _MultiplyDefined :: Prism' r ( Unique , ann, ann)
- _IncoherentUsage :: Prism' r ( Unique , ann, ann)
- _FreeVariable :: Prism' r ( Unique , ann)
-
data
TypeError
term uni fun ann
- = 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
-
class
AsTypeError
r term uni fun ann | r -> term uni fun ann
where
- _TypeError :: Prism' r ( TypeError term uni fun ann)
- _KindMismatch :: Prism' r (ann, Type TyName uni (), Kind (), Kind ())
- _TypeMismatch :: Prism' r (ann, term, Type TyName uni (), Normalized ( Type TyName uni ()))
- _FreeTypeVariableE :: Prism' r (ann, TyName )
- _FreeVariableE :: Prism' r (ann, Name )
- _UnknownBuiltinFunctionE :: Prism' r (ann, fun)
- data FreeVariableError
-
class
AsFreeVariableError
r
where
- _FreeVariableError :: Prism' r FreeVariableError
- _FreeUnique :: Prism' r Unique
- _FreeIndex :: Prism' r Index
-
data
Error
uni fun ann
- = ParseErrorE ParseError
- | UniqueCoherencyErrorE ( UniqueError ann)
- | TypeErrorE ( TypeError ( Term TyName Name uni fun ()) uni fun ann)
- | NormCheckErrorE ( NormCheckError TyName Name uni fun ann)
- | FreeVariableErrorE FreeVariableError
-
class
AsError
r uni fun ann | r -> uni fun ann
where
- _Error :: Prism' r ( Error uni fun ann)
- _ParseErrorE :: Prism' r ParseError
- _UniqueCoherencyErrorE :: Prism' r ( UniqueError ann)
- _TypeErrorE :: Prism' r ( TypeError ( Term TyName Name uni fun ()) uni fun ann)
- _NormCheckErrorE :: Prism' r ( NormCheckError TyName Name uni fun ann)
- _FreeVariableErrorE :: Prism' r FreeVariableError
- throwingEither :: MonadError e m => AReview e t -> Either t a -> m a
-
class
Ord
a =>
ShowErrorComponent
a
where
- showErrorComponent :: a -> String
Documentation
data ParseError Source #
An error encountered during parsing.
UnknownBuiltinType Text SourcePos | |
BuiltinTypeNotAStar Text SourcePos | |
UnknownBuiltinFunction Text SourcePos | |
InvalidBuiltinConstant Text Text SourcePos |
Instances
class AsParseError r where Source #
_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
AsParseError ParseError Source # | |
Defined in PlutusCore.Error _ParseError :: Prism' ParseError ParseError Source # _UnknownBuiltinType :: Prism' ParseError ( Text , SourcePos ) Source # _BuiltinTypeNotAStar :: Prism' ParseError ( Text , SourcePos ) Source # _UnknownBuiltinFunction :: Prism' ParseError ( Text , SourcePos ) Source # _InvalidBuiltinConstant :: Prism' ParseError ( Text , Text , SourcePos ) Source # |
|
AsParseError ( Error uni fun ann) Source # | |
Defined in PlutusCore.Error _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 #
Instances
( 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 # | |
Defined in PlutusCore.Error 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 # | |
Defined in PlutusCore.Error 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 # | |
Defined in PlutusCore.Error (==) :: 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 # | |
Defined in PlutusCore.Error |
|
Generic ( NormCheckError tyname name uni fun ann) Source # | |
Defined in PlutusCore.Error 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 # | |
Defined in PlutusCore.Error rnf :: NormCheckError tyname name uni fun ann -> () Source # |
|
HasErrorCode ( NormCheckError _a _b _c _d _e) Source # | |
Defined in PlutusCore.Error errorCode :: NormCheckError _a _b _c _d _e -> ErrorCode Source # |
|
AsNormCheckError ( NormCheckError tyname name uni fun ann) tyname name uni fun ann Source # | |
Defined in PlutusCore.Error _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 # | |
Defined in PlutusCore.Error
type
Rep
(
NormCheckError
tyname name uni fun ann) =
D1
('
MetaData
"NormCheckError" "PlutusCore.Error" "plutus-core-1.0.0.1-76bWF9ZEWyb4eDyjHx0kCS" '
False
) (
C1
('
MetaCons
"BadType" '
PrefixI
'
False
) (
S1
('
MetaSel
('
Nothing
::
Maybe
Symbol
) '
NoSourceUnpackedness
'
NoSourceStrictness
'
DecidedLazy
) (
Rec0
ann)
:*:
(
S1
('
MetaSel
('
Nothing
::
Maybe
Symbol
) '
NoSourceUnpackedness
'
NoSourceStrictness
'
DecidedLazy
) (
Rec0
(
Type
tyname uni ann))
:*:
S1
('
MetaSel
('
Nothing
::
Maybe
Symbol
) '
NoSourceUnpackedness
'
NoSourceStrictness
'
DecidedLazy
) (
Rec0
Text
)))
:+:
C1
('
MetaCons
"BadTerm" '
PrefixI
'
False
) (
S1
('
MetaSel
('
Nothing
::
Maybe
Symbol
) '
NoSourceUnpackedness
'
NoSourceStrictness
'
DecidedLazy
) (
Rec0
ann)
:*:
(
S1
('
MetaSel
('
Nothing
::
Maybe
Symbol
) '
NoSourceUnpackedness
'
NoSourceStrictness
'
DecidedLazy
) (
Rec0
(
Term
tyname name uni fun ann))
:*:
S1
('
MetaSel
('
Nothing
::
Maybe
Symbol
) '
NoSourceUnpackedness
'
NoSourceStrictness
'
DecidedLazy
) (
Rec0
Text
))))
|
class AsNormCheckError r tyname name uni fun ann | r -> tyname name uni fun ann where Source #
_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
(tyname ~ TyName , name ~ Name ) => AsNormCheckError ( Error uni fun ann) tyname name uni fun ann Source # | |
Defined in PlutusCore.Error |
|
AsNormCheckError ( NormCheckError tyname name uni fun ann) tyname name uni fun ann Source # | |
Defined in PlutusCore.Error _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 #
MultiplyDefined Unique ann ann | |
IncoherentUsage Unique ann ann | |
FreeVariable Unique ann |
Instances
class AsUniqueError r ann | r -> ann where Source #
_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
AsUniqueError ( UniqueError ann) ann Source # | |
Defined in PlutusCore.Error _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 # | |
Defined in PlutusCore.Error _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 #
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
class AsTypeError r term uni fun ann | r -> term uni fun ann where Source #
_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
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
class AsFreeVariableError r where Source #
_FreeVariableError :: Prism' r FreeVariableError Source #
_FreeUnique :: Prism' r Unique Source #
_FreeIndex :: Prism' r Index Source #
Instances
AsFreeVariableError FreeVariableError Source # | |
AsFreeVariableError ( Error uni fun ann) Source # | |
Defined in PlutusCore.Error _FreeVariableError :: Prism' ( Error uni fun ann) FreeVariableError Source # |
|
AsFreeVariableError ( Error uni fun a) Source # | |
Defined in PlutusIR.Error _FreeVariableError :: Prism' ( Error uni fun a) FreeVariableError Source # |
data Error uni fun ann Source #
ParseErrorE ParseError | |
UniqueCoherencyErrorE ( UniqueError ann) | |
TypeErrorE ( TypeError ( Term TyName Name uni fun ()) uni fun ann) | |
NormCheckErrorE ( NormCheckError TyName Name uni fun ann) | |
FreeVariableErrorE FreeVariableError |
Instances
class AsError r uni fun ann | r -> uni fun ann where Source #
_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 #
Instances
AsError ( Error uni fun ann) uni fun ann Source # | |
Defined in PlutusCore.Error _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 #
class Ord a => ShowErrorComponent a where Source #
The type class defines how to print a custom component of
ParseError
.
Since: megaparsec-5.0.0
showErrorComponent :: a -> String Source #
Pretty-print a component of
ParseError
.
Instances
ShowErrorComponent Void | |
Defined in Text.Megaparsec.Error showErrorComponent :: Void -> String Source # errorComponentLen :: Void -> Int Source # |
|
ShowErrorComponent ParseError Source # | |
Defined in PlutusCore.Error showErrorComponent :: ParseError -> String Source # errorComponentLen :: ParseError -> Int Source # |