Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- class NiceParameter p => ParameterEntryPoints p where
- newtype ParameterEntryPointsSplit p = ParameterEntryPointsSplit {}
- mapParameterEntryPoints :: ToT a ~ ToT b => (a -> b) -> ParameterEntryPointsSplit a -> ParameterEntryPointsSplit b
- pepNone :: SingI (ToT p) => ParameterEntryPointsSplit p
- pepPlain :: PesEntryPointsC False cp st => ParameterEntryPointsSplit cp
- pepRecursive :: PesEntryPointsC True cp st => ParameterEntryPointsSplit cp
Documentation
class NiceParameter p => ParameterEntryPoints p where Source #
Which entrypoints given parameter declares.
Instances
ParameterEntryPoints () Source # | |
Defined in Lorentz.EntryPoints |
newtype ParameterEntryPointsSplit p Source #
Implementation of parameterEntryPoints
.
mapParameterEntryPoints :: ToT a ~ ToT b => (a -> b) -> ParameterEntryPointsSplit a -> ParameterEntryPointsSplit b Source #
pepNone :: SingI (ToT p) => ParameterEntryPointsSplit p Source #
No entrypoints declared, parameter type will serve as argument type of the only existing entrypoint.
pepPlain :: PesEntryPointsC False cp st => ParameterEntryPointsSplit cp Source #
Fits for case when your contract exposes multiple entrypoints via having sum type as its parameter.
In particular, this will attach field annotations to immediate parameter "arms" which will be named as corresponding constructor names.
pepRecursive :: PesEntryPointsC True cp st => ParameterEntryPointsSplit cp Source #
Similar to pesEntryPoints
, but for case of parameter being defined as
several nested datatypes.
In particular, this will traverse sum types recursively, stopping at
Michelson primitives (like Natural
) and constructors with number of
fields different from one.