lorentz-0.15.0: EDSL for the Michelson Language
Safe HaskellSafe-Inferred
LanguageHaskell2010

Lorentz.Util.TH

Description

Lorentz template-haskell and quasiquote utilities.

Synopsis

Documentation

entrypointDoc :: QuasiQuoter Source #

QuasiQuote that helps generating ParameterHasEntrypoints instance.

Usage:

[entrypointDoc| Parameter <parameter-type> <optional-root-annotation> |]
[entrypointDoc| Parameter plain |]
[entrypointDoc| Parameter plain "root"|]

See this tutorial which includes this quasiquote.

errorDocArg :: QuasiQuoter Source #

QuasiQuote that helps generating CustomErrorHasDoc instance.

Usage:

[errorDocArg| <error-name> <error-type> <error-description> [<error-arg-type>] |]
[errorDocArg| "errorName" exception "Error description" |]
[errorDocArg| "errorName" contract-internal "Error description" () |]
[errorDocArg| "errorName" bad-argument "Error description" Integer |]

The default argument type is NoErrorArg. Only a type name can be used, if you need complex type, define a type synonym.

See this tutorial which includes this quasiquote.

typeDoc :: QuasiQuoter Source #

QuasiQuote that helps generating TypeHasDoc instance.

Usage:

[typeDoc| <type> <description> |]
[typeDoc| Storage "This is storage description"  |]

See this tutorial which includes this quasiquote.