morley-1.0.0: Developer tools for the Michelson Language

Safe HaskellNone
LanguageHaskell2010

Michelson.TypeCheck.TypeCheck

Synopsis

Documentation

type TcInstrHandler = forall inp. Typeable inp => ExpandedInstr -> HST inp -> TypeCheckInstr (SomeInstr inp) Source #

data TypeCheckEnv Source #

The typechecking state

runTypeCheckIsolated :: TypeCheck a -> Either TCError a Source #

Run type checker as if it worked isolated from other world - no access to environment of the current contract is allowed.

Use this function for test purposes only or for some utilities when environment does not matter. In particular, it is assumed that whatever we typecheck does not depend on the parameter type of the contract which is being typechecked (because there is no contract that we are typechecking).

runTypeCheckInstrIsolated :: TypeCheckInstr a -> Either TCError a Source #

Similar to runTypeCheckIsolated, but for 'TypeCheckInstr.'

mapTCError :: (TCError -> TCError) -> TypeCheckInstr a -> TypeCheckInstr a Source #

Run TypeCheckInstr and modify thrown errors using given functions.