为生成 LLVM IR 而编写的 Ocaml 代码在做什么?

What is this Ocaml code written to generate LLVM IR doing?

我是 Ocaml 的新手,不明白这段代码在做什么

  let global_vars : L.llvalue StringMap.t =
    let global_var m (t, n) = 
      let init = match t with
          A.Float -> L.const_float (ltype_of_typ t) 0.0
        | _ -> L.const_int (ltype_of_typ t) 0
      in StringMap.add n (L.define_global n init the_module) m in
    List.fold_left global_var StringMap.empty globals in

具体来说StringMap.t有什么作用?还有什么? "global_vars : L.llvalue StringMap.t" 是做什么的?

语法形式x: typ是一种类型注解,将x的类型限制为可以与typ统一的类型。

StringMap.t 是在模块 StringMap.

中定义的名为 t 的类型