search for: llglobal

Displaying 2 results from an estimated 2 matches for "llglobal".

2008 Mar 15
0
[LLVMdev] improving the ocaml binding's type safety
...ion] t -> unit > > val make_value : unit -> llvalue t > val make_function : unit -> llfunction t > > Does this sound like it could work, or am I missing something? I think your sum types are incorrect here. Value is abstract; I think you want to say something like: type llglobal = [ `GlobalVariable | `Function | ... ] type llconst = [ llglobal | `ConstantInt | ... ] type llany = [ llconst | ... ] With only the concrete classes given tags. (doxygen is your friend here.) Try mocking up the type system for the concrete types GlobalVariable, Function, ConstantFP and Const...
2008 Mar 15
4
[LLVMdev] improving the ocaml binding's type safety
I was talking to Gordon on #llvm earlier, and he challenged me with coming up with a way to improve the ocaml binding's type safety. We can't go letting haskell beat us now, can we? I think I got an easy solution with phantom types. For those who don't know what the problem is, the ocaml bindings share one type between whole class branches (like values). This means we need to downcast