Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- convertParamNotes :: SingI cp => ParamNotes cp -> ParameterType
- convertContractCode :: forall param store. (SingI param, SingI store) => ContractCode param store -> Contract
- convertContract :: forall param store. (SingI param, SingI store) => Contract param store -> Contract
- instrToOps :: HasCallStack => Instr inp out -> [ExpandedOp]
- untypeDemoteT :: forall (t :: T). SingI t => Type
- untypeValue :: forall t. (SingI t, HasNoOp t) => Value' Instr t -> Value
- sampleTypedValue :: Sing t -> Maybe (Value t)
- flattenEntrypoints :: SingI t => ParamNotes t -> Map EpName Type
Documentation
convertParamNotes :: SingI cp => ParamNotes cp -> ParameterType Source #
convertContractCode :: forall param store. (SingI param, SingI store) => ContractCode param store -> Contract Source #
convertContract :: forall param store. (SingI param, SingI store) => Contract param store -> Contract Source #
instrToOps :: HasCallStack => Instr inp out -> [ExpandedOp] Source #
untypeValue :: forall t. (SingI t, HasNoOp t) => Value' Instr t -> Value Source #
Convert a typed Val
to an untyped Value
.
For full isomorphism type of the given Val
should not contain
TOperation
- a compile error will be raised otherwise.
You can analyse its presence with checkOpPresence
function.
sampleTypedValue :: Sing t -> Maybe (Value t) Source #
Generate a value used for generating examples in documentation.
Since not for all types it is possible to produce a sensible example,
the result is optional. E.g. for operations, never
, not proper
types like contract operation
we return Nothing
.
Misc
flattenEntrypoints :: SingI t => ParamNotes t -> Map EpName Type Source #
Flatten a provided list of notes to a map of its entrypoints and its
corresponding utype. Please refer to mkEntrypointsMap
in regards to how
duplicate entrypoints are handled.