Safe Haskell | None |
---|---|
Language | Haskell2010 |
Module, containing top-level entries of a Michelson contract.
Synopsis
- type ContractInp1 param st = 'TPair param st
- type ContractInp param st = '[ContractInp1 param st]
- type ContractOut1 st = 'TPair ('TList 'TOperation) st
- type ContractOut st = '[ContractOut1 st]
- type ContractCode' instr cp st = instr (ContractInp cp st) (ContractOut st)
- data Contract' instr cp st = (ParameterScope cp, StorageScope st) => Contract {
- cCode :: ContractCode' instr cp st
- cParamNotes :: ParamNotes cp
- cStoreNotes :: Notes st
- cViews :: ViewsSet' instr st
- cEntriesOrder :: EntriesOrder
- defaultContract :: (ParameterScope cp, StorageScope st) => ContractCode' instr cp st -> Contract' instr cp st
- mapContractCode :: (forall i o. instr i o -> instr i o) -> Contract' instr cp st -> Contract' instr cp st
- mapContractCodeBlock :: (ContractCode' instr cp st -> ContractCode' instr cp st) -> Contract' instr cp st -> Contract' instr cp st
- mapContractViewBlocks :: (forall arg ret. ViewCode' instr arg st ret -> ViewCode' instr arg st ret) -> Contract' instr cp st -> Contract' instr cp st
- mapEntriesOrdered :: Contract' instr cp st -> (ParamNotes cp -> a) -> (Notes st -> a) -> (ContractCode' instr cp st -> a) -> [a]
Contract
type ContractInp1 param st = 'TPair param st Source #
type ContractInp param st = '[ContractInp1 param st] Source #
type ContractOut1 st = 'TPair ('TList 'TOperation) st Source #
type ContractOut st = '[ContractOut1 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.
(ParameterScope cp, StorageScope st) => Contract | |
|
Instances
ContainsUpdateableDoc (Contract cp st) Source # | |
Defined in Morley.Michelson.Typed.Doc modifyDocEntirely :: (SomeDocItem -> SomeDocItem) -> Contract cp st -> Contract cp st Source # | |
ContainsDoc (Contract cp st) Source # | |
Defined in Morley.Michelson.Typed.Doc buildDocUnfinalized :: Contract cp st -> ContractDoc Source # | |
ToExpression (Contract cp st) Source # | |
Defined in Morley.Micheline.Class toExpression :: Contract cp st -> Expression Source # | |
(forall (i :: [T]) (o :: [T]). Eq (instr i o)) => Eq (Contract' instr cp st) Source # | |
(forall (i :: [T]) (o :: [T]). Show (instr i o)) => Show (Contract' instr cp st) Source # | |
(forall (i :: [T]) (o :: [T]). NFData (instr i o)) => NFData (Contract' instr cp st) Source # | |
Defined in Morley.Michelson.Typed.Contract |
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
.