morley-1.16.1: Developer tools for the Michelson Language
Safe HaskellNone
LanguageHaskell2010

Morley.Michelson.Typed.Contract

Contents

Description

Module, containing top-level entries of a Michelson contract.

Synopsis

Contract

type ContractInp1 param st = 'TPair param st Source #

type ContractInp param st = '[ContractInp1 param st] Source #

type ContractCode' instr cp st = instr (ContractInp cp st) (ContractOut st) Source #

data Contract' instr cp st Source #

Typed contract and information about annotations which is not present in the contract code.

Constructors

(ParameterScope cp, StorageScope st) => Contract 

Instances

Instances details
ContainsUpdateableDoc (Contract cp st) Source # 
Instance details

Defined in Morley.Michelson.Typed.Doc

ContainsDoc (Contract cp st) Source # 
Instance details

Defined in Morley.Michelson.Typed.Doc

ToExpression (Contract cp st) Source # 
Instance details

Defined in Morley.Micheline.Class

(forall (i :: [T]) (o :: [T]). Eq (instr i o)) => Eq (Contract' instr cp st) Source # 
Instance details

Defined in Morley.Michelson.Typed.Contract

Methods

(==) :: Contract' instr cp st -> Contract' instr cp st -> Bool #

(/=) :: Contract' instr cp st -> Contract' instr cp st -> Bool #

(forall (i :: [T]) (o :: [T]). Show (instr i o)) => Show (Contract' instr cp st) Source # 
Instance details

Defined in Morley.Michelson.Typed.Contract

Methods

showsPrec :: Int -> Contract' instr cp st -> ShowS #

show :: Contract' instr cp st -> String #

showList :: [Contract' instr cp st] -> ShowS #

(forall (i :: [T]) (o :: [T]). NFData (instr i o)) => NFData (Contract' instr cp st) Source # 
Instance details

Defined in Morley.Michelson.Typed.Contract

Methods

rnf :: Contract' instr cp st -> () #

defaultContract :: (ParameterScope cp, StorageScope st) => ContractCode' instr cp st -> Contract' instr cp st Source #

mapContractCode :: (forall i o. instr i o -> instr i o) -> Contract' instr cp st -> Contract' instr cp st Source #

Map all the blocks with some code in the contract.

mapContractCodeBlock :: (ContractCode' instr cp st -> ContractCode' instr cp st) -> Contract' instr cp st -> Contract' instr cp st Source #

Transform contract code block.

To map e.g. views too, see mapContractCode.

mapContractViewBlocks :: (forall arg ret. ViewCode' instr arg st ret -> ViewCode' instr arg st ret) -> Contract' instr cp st -> Contract' instr cp st Source #

mapEntriesOrdered :: Contract' instr cp st -> (ParamNotes cp -> a) -> (Notes st -> a) -> (ContractCode' instr cp st -> a) -> [a] Source #

Map each typed contract fields by the given function and sort the output based on the EntriesOrder.