jon.recoil.org

Module Let_binding.Let_kind

Lambda distinguishes between binding forms that bind an immutable (Llet) vs. mutable (Lmutlet) variable; however, we want to be able to abstract over these uniformly, as in some cases we will be collecting lists of variables we want to bind don't want to split the mutable and immutable ones apart. We thus combine the different immutable let_kinds with the option of having a mutable variable and use that to distinguish what sort of let we're generating.

type t =
  1. | Immutable of Lambda.let_kind
    (*

    Bind an immutable variable of the specified let_kind; corresponds to Llet.

    *)
  2. | Mutable
    (*

    Bind a mutable variable; corresponds to Lmutlet.

    *)

What sort of variable are we binding?