search for: llany

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

2008 Mar 15
0
[LLVMdev] improving the ocaml binding's type safety
...lfunction 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 ConstantInt; the abstract types GlobalValue, Value and Constant; and the functions set_value_name, li...
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