I am looking at a codegen.ml file being used to create LLVM IR. I am unfamilar with Ocaml so just require some clarification
let i32_t = L.i32_type context
and float_t = L.double_type context
let ltype_of_typ = function
A.Int -> i32_t
| A.Float -> float_t
in
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
So for this line
A.Float -> L.const_float (ltype_of_typ t) 0.0
What is the stuff after "->" doing? Is it casting 0.0 to a float?