| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Lorentz.EntryPoints.Impl
Description
Common implementations of entrypoints.
Synopsis
- data EpdPlain
- data EpdRecursive
Documentation
Implementation of ParameterHasEntryPoints which fits for case when
your contract exposes multiple entrypoints via having sum type as its
parameter.
In particular, each constructor would produce a homonymous entrypoint with
argument type equal to type of constructor field (each constructor should
have only one field).
Constructor called Default will designate the default entrypoint.
Instances
| PlainEntryPointsC False cp => EntryPointsDerivation EpdPlain cp Source # | |
Defined in Lorentz.EntryPoints.Impl Associated Types type EpdAllEntryPoints EpdPlain cp :: [(Symbol, Type)] Source # type EpdLookupEntryPoint EpdPlain cp :: Symbol -> Exp (Maybe Type) Source # Methods epdNotes :: Notes (ToT cp) Source # epdCall :: (KnownSymbol name, ParameterScope (ToT cp)) => Label name -> EpConstructionRes (ToT cp) (Eval (EpdLookupEntryPoint EpdPlain cp name)) Source # | |
| type EpdAllEntryPoints EpdPlain cp Source # | |
Defined in Lorentz.EntryPoints.Impl | |
| type EpdLookupEntryPoint EpdPlain cp Source # | |
Defined in Lorentz.EntryPoints.Impl | |
data EpdRecursive Source #
Similar to EpdPlain, 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.
It does not assign names to intermediate nodes of Or tree, only to the very
leaves.
Instances
| PlainEntryPointsC True cp => EntryPointsDerivation EpdRecursive cp Source # | |
Defined in Lorentz.EntryPoints.Impl Associated Types type EpdAllEntryPoints EpdRecursive cp :: [(Symbol, Type)] Source # type EpdLookupEntryPoint EpdRecursive cp :: Symbol -> Exp (Maybe Type) Source # Methods epdNotes :: Notes (ToT cp) Source # epdCall :: (KnownSymbol name, ParameterScope (ToT cp)) => Label name -> EpConstructionRes (ToT cp) (Eval (EpdLookupEntryPoint EpdRecursive cp name)) Source # | |
| type EpdAllEntryPoints EpdRecursive cp Source # | |
Defined in Lorentz.EntryPoints.Impl | |
| type EpdLookupEntryPoint EpdRecursive cp Source # | |
Defined in Lorentz.EntryPoints.Impl | |