Safe Haskell | Safe-Inferred |
---|---|
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. WellTyped t => Sing t -> Maybe (Value t)
- flattenEntrypoints :: HandleImplicitDefaultEp -> ParamNotes t -> Map EpName Ty
- data HandleImplicitDefaultEp
- eqInstrExt :: Instr i1 o1 -> Instr i2 o2 -> Bool
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 octez-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. WellTyped 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 :: HandleImplicitDefaultEp -> 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.
data HandleImplicitDefaultEp Source #
A simple enum flag to choose how to handle implicit default entrypoint in
mkEntrypointsMap
.
WithoutImplicitDefaultEp | Omit the default entrypoint unless it's specified explicitly. |
WithImplicitDefaultEp | Include the default entrypoint even if it's not specified explicitly. This produces exactly the full set of entrypoints as per Michelson spec. |
Instances
Orphan instances
SingI s => Eq (TestAssert s) Source # | |
(==) :: TestAssert s -> TestAssert s -> Bool # (/=) :: TestAssert s -> TestAssert s -> Bool # | |
Buildable (Instr inp out) Source # | |
Buildable (Value' Instr t) Source # | |
Eq (Instr inp out) Source # | |
RenderDoc (Instr inp out) Source # | |
HasNoOp t => RenderDoc (Value' Instr t) Source # | |