search for: precast

Displaying 6 results from an estimated 6 matches for "precast".

Did you mean: recast
2007 Nov 25
0
[LLVMdev] OCaml
> On Sunday 25 November 2007 03:42, Christopher Lamb wrote: >> Try this google query. I know there's been some discussion/work on >> OCaml and LLVM. >> >> site:lists.cs.uiuc.edu/pipermail/llvmdev OCaml interface > > I just rediscovered the OCaml bindings in bindings/ocaml (rather than the > ones > in test/Bindings/OCaml!). They do indeed look quite
2007 Nov 25
2
[LLVMdev] OCaml
On Sunday 25 November 2007 03:42, Christopher Lamb wrote: > Try this google query. I know there's been some discussion/work on > OCaml and LLVM. > > site:lists.cs.uiuc.edu/pipermail/llvmdev OCaml interface I just rediscovered the OCaml bindings in bindings/ocaml (rather than the ones in test/Bindings/OCaml!). They do indeed look quite complete but I can't find any examples
2007 Nov 25
2
[LLVMdev] OCaml
...g around with it now. The lexer, parser and AST written using camlp4 might look something like this in OCaml: type ast = | Num of float | Var of string | BinOp of [ `Add | `Sub | `Mul | `Less ] * ast * ast | Call of string * ast list | Function of string * string list * ast open Camlp4.PreCast;; let expr = Gram.Entry.mk "expr" ;; EXTEND Gram expr: [ [ e1 = expr; "+"; e2 = expr -> BinOp(`Add, e1, e2) | e1 = expr; "-"; e2 = expr -> BinOp(`Sub, e1, e2) ] | [ e1 = expr; "*"; e2 = expr -> BinOp(`Mul, e1, e2) ] | [ e1 = exp...
2013 Dec 06
2
Bug#731529: xen-api-libs: FTBFS with ocaml 4.01.0
...annot -g -c -package camlp4,type_conv -pp "camlp4orf" -I /usr/lib/ocaml/camlp4 -I /usr/lib/ocaml/type_conv pa_rpc.cmo pa_rpc.ml > File "pa_rpc.ml", line 20, characters 72-75: > Error: This expression has type bool but an expression was expected of type > Camlp4.PreCast.Ast.ctyp > make[2]: *** [pa_rpc.cmo] Error 2 > make[1]: *** [all] Error 2 > make[2]: Leaving directory `/?PKGBUILDDIR?/rpc-light' > make[1]: Leaving directory `/?PKGBUILDDIR?' > dh_auto_build: make -j1 returned exit code 2 > make: *** [build-arch] Error 2 Full build logs...
2007 Nov 26
0
[LLVMdev] Fibonacci example in OCaml
...y subset of OCaml that is expressive enough to compile an external Fibonacci program: type expr = | Int of int | Var of string | BinOp of [ `Add | `Sub | `Leq ] * expr * expr | If of expr * expr * expr | Apply of expr * expr type defn = | LetRec of string * string * expr open Camlp4.PreCast;; let expr = Gram.Entry.mk "expr" let defn = Gram.Entry.mk "defn" let prog = Gram.Entry.mk "defn" EXTEND Gram expr: [ [ "if"; p = expr; "then"; t = expr; "else"; f = expr -> If(p, t, f) ] | [ e1 = expr; "<="; e2 =...
2007 Nov 25
2
[LLVMdev] Fibonacci example in OCaml
Here's my translation of the Fibonacci example into OCaml: open Printf open Llvm let build_fib m = let fibf = define_function "fib" (function_type i32_type [| i32_type |]) m in let bb = builder_at_end (entry_block fibf) in let one = const_int i32_type 1 and two = const_int i32_type 2 in let argx = param fibf 0 in set_value_name "AnArg" argx; let