File: README.md

package info (click to toggle)
ocaml-gen 0.5.3-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 296 kB
  • sloc: ml: 2,124; makefile: 35
file content (72 lines) | stat: -rw-r--r-- 1,820 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# Gen [![build status](https://travis-ci.org/c-cube/gen.svg?branch=master)](https://travis-ci.org/c-cube/gen)

Iterators for OCaml, both restartable and consumable. The implementation
keeps a good balance between simplicity and performance.

The library is extensively tested using `qtest`. If you find a bug,
please report!

The documentation can be found [here](http://c-cube.github.io/gen/)
the main module is [Gen](https://github.com/c-cube/gen/blob/master/src/gen.mli)
and should suffice for 95% of use cases.

[Changelog](https://github.com/c-cube/gen/blob/master/CHANGELOG.md)

## Native install

Installation in a native OCaml project, via [opam](https://opam.ocaml.org/):

```sh
$ opam install gen
```

or, manually, by building the library and running `make install`. Opam is
recommended, for it keeps the library up-to-date.

## BuckleScript install

Installation in JavaScript, via [BuckleScript](https://bucklescript.github.io/bucklescript/Manual.html),
in an [npm](https://npmjs.com/) project:

1. Install this package:

   ```sh
   $ npm install bs-gen
   ```

2. Manually add `bs-gen` to your `bsconfig.json`'s `bs-dependencies`:

   ```json
   "bs-dependencies": [
      ...
      "bs-gen"
   ],
   ```

## Use

You can either build and install the library (see "Build"), or just copy
files to your own project. The last solution has the benefits that you
don't have additional dependencies nor build complications (and it may enable
more inlining).

If you have comments, requests, or bugfixes, please share them! :-)

## Build

There are no dependencies except for `dune` for building. This should work with `OCaml>=4.02`

```sh
$ make
```

To build and run tests (requires `oUnit` and `qtest`):

```sh
$ opam install oUnit qtest
$ make test
```

## License

This code is free, under the BSD license.