lorentz-0.14.1: 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.

errorDoc :: QuasiQuoter Source #

Deprecated: errorDoc is deprecated, use errorDocArg with () argument instead

QuasiQuote that helps generating CustomErrorHasDoc instance.

Usage:

[errorDoc| <error-name> <error-type> <error-description> |]
[errorDoc| "errorName" exception "Error description" |]

This is equivalent to errorDocArg with () specified as error argument type.

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.