Safe Haskell | None |
---|---|
Language | Haskell2010 |
Michelson contract in untyped model.
Synopsis
- data EntriesOrder
- canonicalEntriesOrder :: EntriesOrder
- entriesOrderToInt :: EntriesOrder -> (Int, Int, Int)
- mapEntriesOrdered :: Contract' op -> (ParameterType -> a) -> (Storage -> a) -> ([op] -> a) -> [a]
- data ContractBlock op
- = CBParam ParameterType
- | CBStorage Type
- | CBCode [op]
- orderContractBlock :: (ContractBlock op, ContractBlock op, ContractBlock op) -> Maybe (Contract' op)
- data Contract' op = Contract {}
- type Storage = Type
Documentation
data EntriesOrder Source #
Top-level entries order of the contract. This is preserved due to the fact that it affects the output of pretty-printing and serializing contract.
Instances
canonicalEntriesOrder :: EntriesOrder Source #
The canonical entries order which is ordered as follow:
parameter
, storage
, and code
.
entriesOrderToInt :: EntriesOrder -> (Int, Int, Int) Source #
(Int, Int, Int)
is the positions of parameter
, storage
, and code
respectively.
mapEntriesOrdered :: Contract' op -> (ParameterType -> a) -> (Storage -> a) -> ([op] -> a) -> [a] Source #
Map each contract fields by the given function and sort the output
based on the EntriesOrder
.
data ContractBlock op Source #
Contract block, convenient when parsing
Instances
Eq op => Eq (ContractBlock op) Source # | |
Defined in Michelson.Untyped.Contract (==) :: ContractBlock op -> ContractBlock op -> Bool # (/=) :: ContractBlock op -> ContractBlock op -> Bool # | |
Show op => Show (ContractBlock op) Source # | |
Defined in Michelson.Untyped.Contract showsPrec :: Int -> ContractBlock op -> ShowS # show :: ContractBlock op -> String # showList :: [ContractBlock op] -> ShowS # |
orderContractBlock :: (ContractBlock op, ContractBlock op, ContractBlock op) -> Maybe (Contract' op) Source #
Contract | |
|