search for: int_op

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

Did you mean: inst_op
2008 Mar 15
0
[LLVMdev] improving the ocaml binding's type safety
...t time debugging? On Saturday 15 March 2008 08:03:47 Erick Tryzelaar wrote: > Does this sound like it could work, or am I missing something? Excellent idea. You might also consider building a data structure on the OCaml side that is equivalent to the LLVM code: module Op = struct type int_op = [ `IAdd | ... ] type float_op = [ `FAdd | ... ] type bool_op = [ `ILe of int_op * int_op | ... ] type t = [ int_op | float_op | bool_op | ... ] end Now you have int_op and bool_op as subtypes of Op.t. Note that neither of these approaches can be as expressive as using GADTs which...
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