| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Michelson.TypeCheck.Value
Synopsis
- typeCheckValImpl :: forall ty. SingI ty => TcInstrHandler -> Value -> TypeCheckInstr (Value ty)
Documentation
typeCheckValImpl :: forall ty. SingI ty => TcInstrHandler -> Value -> TypeCheckInstr (Value ty) Source #
Function typeCheckValImpl converts a single Michelson value
given in representation from 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.