English 中文(简体)
在多个名录中建立一个OCaml项目
原标题:Building an OCaml project in multiple directories
  • 时间:2012-05-06 03:59:50
  •  标签:
  • ocaml

我有一个利用OCamlMakefile建造的中型OCaml项目(13K条线,85个源文档),但稍微超过OCamlMakefile:本意是,我更喜欢将其分成三或四个目录,并在这些图书馆中建立档案,特别是因为整个项目的某些部分应当成为各自独立的项目。

What is the recommended way of doing this, in 2012? OCamlMakefile imposes a number of simplifications which get in the way of what would be considered conventional code organisation in most other programming environments.

问题回答

我在项目上也存在同样的问题。 我最后使用了OCamlMakefile(make libinstall)和ocamlfind与的组合。 OCAMLFIND_DESTDIROCAMLPATH的变量指向当地共同建筑名录。

它采取真正灵活的做法。 例如,我又使用simple script,将几个图书馆合并成一个图书馆,合并其个人代码





相关问题
ocamlc, module compilation

I wrote an app in ocaml. It consist of several modules: Util (util.ml) Work1 (work1.ml) -- open Util Work2 (work2.ml) -- open Util, too Main (main.ml) -- open all of them. When i compile its, using ...

How can I simplify this ocaml pattern-matching code?

I m writing a simple little ocaml program that reads an algebraic statement in from a file, parses it into an AST using ocamllex/ocamlyacc, reduces it, and then prints it. The part where I m reducing ...

How can I create a type with multiple parameters in OCaml?

I m trying to create a type that has multiple type parameters. I know how to make a type with one parameter: type a foo = a * int But I need to have two parameters, so that I can parameterize the ...

Hashtable indexed on several fields

I m currently programming an OCaml module defining a type corresponding to a CPU register. The interface of this module is the following : (* * Defines a type which represents a R3000 register. *) ...

Extending an existing type in OCaml

I ve been doing some OCaml programming lately to learn the language and to get more acquainted with functional programming. Recently, I ve started to think that I d like to be able to extend an ...

Ocaml Syntax Error

What s wrong with this code? I can t figure it out: let parent (rules : grammar) (symbol1 : string) (symbol2 : string) : (SymbolSet.t) = try SymbolSet.singleton (getParent [symbol1; symbol2] ...

热门标签