Browse Source

switch to dune 2, clean repo

master
zapashcanon 2 years ago
parent
commit
f06b2085c2
Signed by: zapashcanon GPG Key ID: 8981C3C62D1D28F1
  1. 3
      .gitignore
  2. 56
      README.md
  3. 10
      dune-project
  4. 6
      memo.opam
  5. 8
      src/dune

3
.gitignore

@ -1,3 +1,4 @@
*.merlin
_build/
_coverage/
*.merlin
*.install

56
README.md

@ -121,62 +121,6 @@ let curr_size = Memo.get_initial_cache_size ()
Note that with the current implementation of hash tables in OCaml, it's better if you choose a power of two. You may saw some code using a prime number, it's because some years ago it was the best thing to do as the hash tables implementation was different. [Jean-Christophe Filliâtre] explained this to me, thanks again ! Also keep in mind that if you use your own defined cache using the `Mk` functor, it may not be the right thing to do.
## Build
To build the library:
```sh
scripts/build.sh
```
To clean after building:
```sh
scripts/clean.sh
```
## Documentation
To build the documentation:
```sh
scripts/doc.sh
```
You can open it in your browser using:
```sh
scripts/view_doc.sh
```
## Tests
To run the tests:
```sh
scripts/test.sh
```
To run the tests with coverage report:
```sh
scripts/coverage.sh
```
You can open the tests coverage report in your web browser using:
```sh
scripts/view_coverage.sh
```
## Format
You can format the code using:
```sh
scripts/format.sh
```
## License
See [LICENSE].

10
dune-project

@ -1,4 +1,4 @@
(lang dune 1.11)
(lang dune 2.0)
(name memo)
@ -19,8 +19,6 @@
(generate_opam_files true)
(explicit_js_mode)
(package
(name memo)
(synopsis "Memoïzation library")
@ -28,8 +26,8 @@
"memo is an OCaml library for memoïzation. It provides easy ways to memoïze a function, in a type-safe and modular way and the ability to get forgetful memoïzation.")
(depends
(ocaml
(>= 4.05.0))
(>= 4.05))
(dune
(>= 1.11.0))
(>= 2.0))
(bisect_ppx
(>= 1.4.1))))
(>= 1.4))))

6
memo.opam

@ -10,9 +10,9 @@ homepage: "https://git.zapashcanon.fr/zapashcanon/memo"
doc: "https://doc.zapashcanon.fr/memo/"
bug-reports: "https://git.zapashcanon.fr/zapashcanon/memo/issues"
depends: [
"ocaml" {>= "4.05.0"}
"dune" {>= "1.11.0"}
"bisect_ppx" {>= "1.4.1"}
"ocaml" {>= "4.05"}
"dune" {>= "2.0"}
"bisect_ppx" {>= "1.4"}
]
build: [
["dune" "subst"] {pinned}

8
src/dune

@ -1,5 +1,5 @@
(library
(name memo)
(public_name memo)
(wrapped false)
(preprocess (pps bisect_ppx -conditional)))
(public_name memo)
(wrapped false)
(preprocess
(pps bisect_ppx -conditional)))
Loading…
Cancel
Save