Instruct.Make_trans
Apply a transformation module and a semantics module to produce a new semantics module that uses the transformation state.
The module this creates won't do any transformations by itself, and its values are defined as identity functions. You need to override specific functions to apply transformations.
Define the semantics of our abstract language.
module F : SEM with type 'a exp = 'a T.from_exp and type 'a stm = 'a T.from_stm
type 'a stm = 'a T.stm
A statement, generally some side-effecting code.
type 'a obs = 'a F.obs
The final evaluation result.
type 'a exp = 'a T.exp
An expression.
type 'a ref = 'a F.ref
A mutable reference variable. This is not compatible with expressions.
Define a new immutable binding. The string is used for pretty-printing.
Define a new reference variable. The string is used for pretty-printing.
val unit : unit stm
val int : int -> int exp
val float : float -> float exp
val string : string -> string exp
val bool : bool -> bool exp
The given function applies to the following characters and it ignores all others: '&' '"' '\'' '>' '<' '/' '`' '='
.
val buffer_create : unit -> Stdlib.Buffer.t exp
type 'a promise = 'a F.promise
An asynchronous computation.
This is necessary for JavaScript async/await syntax compatibility.
type untyped = F.untyped
module type UNTYPED = sig ... end
Make a new untyped wrapper. The string is used for pretty-printing.
module External : sig ... end
Data from the outside world that we need to decode.
type import = F.import
Information to import a function from external code.