Module Middle.Stmt

MIR types and modules corresponding to the statements of the language

module Pattern : sig ... end
type ('a, 'b) t = {
  1. pattern : ('a Expr.t, ('a, 'b) t) Pattern.t;
  2. meta : 'b;
}

The "two-level" type for statements in the MIR. This corresponds to what the AST calls Frontend.Ast.statement_with

include Ppx_compare_lib.Comparable.S2 with type ('a, 'b) t := ('a, 'b) t
val compare : 'a Base__Ppx_compare_lib.compare -> 'b Base__Ppx_compare_lib.compare -> ('a, 'b) t Base__Ppx_compare_lib.compare
include Ppx_hash_lib.Hashable.S2 with type ('a, 'b) t := ('a, 'b) t
val hash_fold_t : 'a Base__Ppx_hash_lib.hash_fold -> 'b Base__Ppx_hash_lib.hash_fold -> ('a, 'b) t Base__Ppx_hash_lib.hash_fold
include Sexplib0.Sexpable.S2 with type ('a, 'b) t := ('a, 'b) t
val t_of_sexp : (Sexplib0__.Sexp.t -> 'a) -> (Sexplib0__.Sexp.t -> 'b) -> Sexplib0__.Sexp.t -> ('a, 'b) t
val sexp_of_t : ('a -> Sexplib0__.Sexp.t) -> ('b -> Sexplib0__.Sexp.t) -> ('a, 'b) t -> Sexplib0__.Sexp.t
val pp : ('a, 'b) t Fmt.t
val rewrite_bottom_up : f:('a Expr.t -> 'a Expr.t) -> g:(('a, 'b) t -> ('a, 'b) t) -> ('a, 'b) t -> ('a, 'b) t

rewrite_bottom_up specializes fold so that the result type 'r1 is equal to the type of the nested fixed-point type i.e. 'r1 = 'a Expr.t and the result type 'r2 is equal to the top-level fixed-point type i.e. 'r2 = ('a,'b) t.

This also means that the function f can be written with our nested fixed-point type 'a Expr.t as its argument and g can be written with ('a,'b) t as its argument.

module Located : sig ... end
module Numbered : sig ... end
module Helpers : sig ... end