Safe Haskell | None |
---|---|
Language | Haskell2010 |
Errors that can occur when some code is being typechecked.
Synopsis
- data ExpectType
- = ExpectTypeVar
- | ExpectStackVar
- | ExpectBool
- | ExpectInt
- | ExpectNat
- | ExpectByte
- | ExpectString
- | ExpectAddress
- | ExpectKey
- | ExpectKeyHash
- | ExpectSignature
- | ExpectContract
- | ExpectMutez
- | ExpectList (Maybe ExpectType)
- | ExpectSet (Maybe ExpectType)
- | ExpectMap
- | ExpectBigMap
- | ExpectOption (Maybe ExpectType)
- | ExpectPair (Maybe ExpectType) (Maybe ExpectType)
- | ExpectOr (Maybe ExpectType) (Maybe ExpectType)
- | ExpectLambda (Maybe ExpectType) (Maybe ExpectType)
- data TypeContext
- data TCTypeError
- = AnnError AnnConvergeError
- | TypeEqError T T
- | StackEqError [T] [T]
- | UnsupportedTypeForScope T BadTypeForScope
- | NotNumericTypes T T
- | UnexpectedType (NonEmpty (NonEmpty ExpectType))
- | InvalidInstruction ExpandedInstr
- | InvalidValueType T
- | NotEnoughItemsOnStack
- | IllegalEntrypoint EpNameFromRefAnnError
- | UnknownContract Address
- | EntrypointNotFound EpName
- | IllegalParamDecl ParamEpError
- | NegativeNat
- | MutezOverflow
- | InvalidAddress ParseEpAddressError
- | InvalidKeyHash CryptoParseError
- | InvalidTimestamp
- | CodeAlwaysFails
- | EmptyCode
- | AnyError
- data TCError
- = TCFailedOnInstr ExpandedInstr SomeHST InstrCallStack (Maybe TypeContext) (Maybe TCTypeError)
- | TCFailedOnValue Value T Text InstrCallStack (Maybe TCTypeError)
- | TCContractError Text (Maybe TCTypeError)
- | TCUnreachableCode InstrCallStack (NonEmpty ExpandedOp)
- | TCExtError SomeHST InstrCallStack ExtError
- data ExtError
- newtype StackSize = StackSize Natural
Documentation
data ExpectType Source #
Description of the type to be expected by certain instruction.
Instances
data TypeContext Source #
Contexts where type error can occur.
Instances
data TCTypeError Source #
Data type that represents various errors
which are related to type system.
These errors are used to specify info about type check errors
in TCError
data type.
AnnError AnnConvergeError | Annotation unify error |
TypeEqError T T | Type equality error |
StackEqError [T] [T] | Stacks equality error |
UnsupportedTypeForScope T BadTypeForScope | Error that happens when type cannot be used in the corresponding scope.
Argument of this constructor carries type which violates
the restriction, e.g. |
NotNumericTypes T T | Arithmetic operation is applied to types, at least one of which is not numeric
(e.g. |
UnexpectedType (NonEmpty (NonEmpty ExpectType)) | Error that happens when actual types are different from the type that instruction expects. The param is an non-empty list of all expected stack types that the instruction would accept. Each expected stack types is represented as non-empty list as well. |
InvalidInstruction ExpandedInstr | Some instruction can not be used in a specific context, like |
InvalidValueType T | Error that happens when a |
NotEnoughItemsOnStack | There are not enough items on stack to perform a certain instruction. |
IllegalEntrypoint EpNameFromRefAnnError | Invalid entrypoint name provided |
UnknownContract Address | Contract with given address is not originated. |
EntrypointNotFound EpName | Given entrypoint is not present. |
IllegalParamDecl ParamEpError | Incorrect parameter declaration (with respect to entrypoints feature). |
NegativeNat | Natural numbers cannot be negative |
MutezOverflow | Exceeds the maximal mutez value |
InvalidAddress ParseEpAddressError | Address couldn't be parsed from its textual representation |
InvalidKeyHash CryptoParseError | KeyHash couldn't be parsed from its textual representation |
InvalidTimestamp | Timestamp is not RFC339 compliant |
CodeAlwaysFails | Code always fails, but shouldn't, like ITER body. |
EmptyCode | Empty block of code, like ITER body. |
AnyError | Generic error when instruction does not match something sensible. |
Instances
Type check error
Instances
Various type errors possible when checking Morley extension commands