Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- convertParamNotes :: ParamNotes cp -> ParameterType
- convertView :: forall arg store ret. View arg store ret -> View
- convertSomeView :: SomeView st -> View
- convertContractCode :: forall param store. (SingI param, SingI store) => ContractCode param store -> Contract
- convertContract :: Contract param store -> Contract
- instrToOps :: HasCallStack => Instr inp out -> [ExpandedOp]
- instrToOpsOptimized :: HasCallStack => Instr inp out -> [ExpandedOp]
- untypeDemoteT :: forall (t :: T). SingI t => Ty
- untypeValue :: HasNoOp t => Value' Instr t -> Value
- untypeValueHashable :: HasNoOp t => Value' Instr t -> Value
- untypeValueOptimized :: HasNoOp t => Value' Instr t -> Value
- sampleTypedValue :: forall t. Sing t -> Maybe (Value t)
- flattenEntrypoints :: ParamNotes t -> Map EpName Ty
Documentation
convertParamNotes :: ParamNotes cp -> ParameterType Source #
Convert typed parameter annotations to an untyped ParameterType
.
convertView :: forall arg store ret. View arg store ret -> View Source #
convertSomeView :: SomeView st -> View Source #
convertContractCode :: forall param store. (SingI param, SingI store) => ContractCode param store -> Contract Source #
Convert typed ContractCode
to an untyped Contract
.
convertContract :: Contract param store -> Contract Source #
instrToOps :: HasCallStack => Instr inp out -> [ExpandedOp] Source #
Convert Haskell-typed Instr
to a list of human-readable untyped operations
instrToOpsOptimized :: HasCallStack => Instr inp out -> [ExpandedOp] Source #
Convert Haskell-typed Instr
to a list of optimized untyped operations
untypeDemoteT :: forall (t :: T). SingI t => Ty Source #
Convert a Haskell type-level type tag into an untyped value representation.
This function is intended to be used with TypeApplications
.
untypeValue :: HasNoOp t => Value' Instr t -> Value Source #
Convert a typed value to an untyped human-readable representation
untypeValueHashable :: HasNoOp t => Value' Instr t -> Value Source #
Like untypeValueOptimized
, but without list notation for pairs.
Created to match tezos-client hash data
behaviour for typed values.
untypeValueOptimized :: HasNoOp t => Value' Instr t -> Value Source #
Convert a typed value to an untyped optimized representation
sampleTypedValue :: forall t. 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 :: ParamNotes t -> Map EpName Ty 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.
Orphan instances
SingI s => Eq (TestAssert s) Source # | |
(==) :: TestAssert s -> TestAssert s -> Bool # (/=) :: TestAssert s -> TestAssert s -> Bool # | |
Eq (Instr inp out) Source # | |
Buildable (Value' Instr t) Source # | |
Buildable (Instr inp out) Source # | |
HasNoOp t => RenderDoc (Value' Instr t) Source # | |
RenderDoc (Instr inp out) Source # | |