package tezos-protocol-014-PtKathma

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Gas_monad.SyntaxSource

Syntax module for the Gas_monad. This is intended to be opened locally in functions. Within the scope of this module, the code can include binding operators, leading to a let-style syntax. Similar to Lwt_result_syntax and other syntax modules.

Sourceval return : 'a -> ('a, 'trace) t

return x returns a value in the gas-monad.

Sourceval return_unit : (unit, 'trace) t

return_unit is return () .

Sourceval return_none : ('a option, 'trace) t

return_none is return None .

Sourceval return_some : 'a -> ('a option, 'trace) t

return_some x is return (Some x) .

Sourceval return_nil : ('a list, 'trace) t

return_nil is return [] .

Sourceval return_true : (bool, 'trace) t

return_true is return true .

Sourceval return_false : (bool, 'trace) t

return_false is return false .

Sourceval fail : 'trace -> ('a, 'trace) t

fail e is return (Error e) .

Sourceval (let*) : ('a, 'trace) t -> ('a -> ('b, 'trace) t) -> ('b, 'trace) t

let* is a binding operator alias for bind.

Sourceval (let+) : ('a, 'trace) t -> ('a -> 'b) -> ('b, 'trace) t

let+ is a binding operator alias for map.

Sourceval (let*?) : ('a, 'trace) Tezos_protocol_environment_014_PtKathma.Pervasives.result -> ('a -> ('b, 'trace) t) -> ('b, 'trace) t

let*? is for binding the value from result-only expressions into the gas-monad.

OCaml

Innovation. Community. Security.