Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- typeCheckValImpl :: TcInstrHandler -> Value -> (Sing t, Notes t) -> TypeCheckInstr SomeNotedValue
- typeCheckCValue :: Value' op -> CT -> Either (Value' op, TCTypeError) SomeCValue
Documentation
typeCheckValImpl :: TcInstrHandler -> Value -> (Sing t, Notes t) -> TypeCheckInstr SomeNotedValue Source #
Function typeCheckValImpl
converts a single Michelson value
given in representation from Michelson.Type
module to representation
in strictly typed GADT.
As a third argument, typeCheckValImpl
accepts 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.
typeCheckCValue :: Value' op -> CT -> Either (Value' op, TCTypeError) SomeCValue Source #