Questions tagged [ocamlbuild]

OCamlbuild is a generic build tool, that has built-in rules for building OCaml library and programs.

OCamlbuild is a generic build tool, that has built-in rules for building library and programs.

Useful resources

160 questions
0
votes
2 answers

Don't understand symbols in OCaml

I'm learning OCaml these days by some basic material and a project written in OCaml. But I don't understand some symbols in OCaml. For example: open Batteries type char_token = [ | `Char of int | `Escape of char list ] what's…
KUN
  • 527
  • 4
  • 18
0
votes
1 answer

ocaml Error: This expression has type expr but is here used with type unit -> expr

I can't figure out what this error means, I've never seen if before the line it is complaining about is the line that contains x -> let I was using match with before this but it was still giving me the same error. let rec build (rand,depth) = match…
Charles Haro
  • 1,866
  • 3
  • 22
  • 36
-1
votes
1 answer

What does "let name(param1, param2) = .." mean in ocaml (as opposed to just let name = ...)?

I'm looking at a compiler written for a extremely pared down version of C. I'm new to ocaml, and am particularly confused about this structure let check (globals, functions) = (* A bunch of stuff abstracted out *) let check_function ... ....…
Shisui
  • 1,051
  • 1
  • 8
  • 23
-1
votes
1 answer

Ocaml Abstract Sytnax Tree

I have working expression however when I try to evaluate my expressions with my current evaluate function I get following error-- "Error: This pattern matches values of type 'a * 'b but a pattern was expected which matches values of type args".…
mva
  • 11
  • 2
-1
votes
1 answer

.How do you create a new file in Ocaml and where does it store it?

I can't seem to find the answer, how do you create a new file in Ocaml? Do you edit your file in the terminal? Where does the source code appear?
TomD
  • 9
  • 1
  • 7
-1
votes
1 answer

Unbound module llvm

I have been working through the LLVM Kaleidoscope Tutorial for OCaml. On the third part of the tutorial, I have navigated to the example code in the folder OCaml-Kaleidoscope\Chapter3 I am encountering an issue when compiling with ocamlbuild…
-1
votes
1 answer

Ocamlbuild plugin: build dynamic dependencies only if the target has changed

I'm trying to write an ocamlbuild plugin. The goal is to build Qt apps (without OCaml code for the time being). To handle the final linking phase, I have written the list of objs, mocs, uis and rcs in a .qtobjs file (like a .itarget), and the list…
-1
votes
1 answer

how to invoke module in ocaml

I have wrote a ocaml file which includes Vector module and Matrix module, and I want to invoke Vector module in the Matrix module, but the compiler said that Vector module is unbound module. I don't know why,here is my code module Vector = Struct …
高亮节
  • 169
  • 1
  • 1
  • 9
-2
votes
1 answer

Ocaml syntax error : pattern expected in building zip fuction

I want to make fuction called zip so: zip [1;2;3;4] [5;6;7;8] would produce: [1;5;2;6;3;7;4;8] but I'm getting an error: line#4 h2::t2 make error syntax error : pattern expected What would be the correct syntax? let rec zip lst1 lst2 = match…
1 2 3
10
11