Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- typeCheckValImpl :: forall ty op. (SingI ty, IsInstrOp op) => Maybe TcOriginatedContracts -> TcInstrBase op -> Value' op -> TypeCheckInstr op (Value ty)
- tcFailedOnValue :: Value' op -> T -> Text -> Maybe TcTypeError -> TypeCheckInstr op a
Documentation
typeCheckValImpl :: forall ty op. (SingI ty, IsInstrOp op) => Maybe TcOriginatedContracts -> TcInstrBase op -> Value' op -> TypeCheckInstr op (Value ty) Source #
Function typeCheckValImpl
converts a single Michelson value
given in representation from Morley.Michelson.Type
module to representation
in strictly typed GADT.
typeCheckValImpl
is polymorphic in the expected type of value.
Type checking algorithm pattern-matches on parse value representation,
expected type t
and constructs Val t
value.
If there was no match on a given pair of value and expected type, that is interpreted as input of wrong type and type check finishes with error.
typeCheckValImpl
also has a 'Maybe TcOriginatedContracts' argument that
should contain the originated contracts when typechecking a parameter and
Nothing
otherwise.
tcFailedOnValue :: Value' op -> T -> Text -> Maybe TcTypeError -> TypeCheckInstr op a Source #