File tree 2 files changed +54
-3
lines changed
2 files changed +54
-3
lines changed Original file line number Diff line number Diff line change 1
1
# Frontend to dune.
2
2
3
- .PHONY : default build install uninstall test clean
3
+ .PHONY : default build install uninstall test clean utop
4
4
5
5
default : build
6
6
@@ -18,6 +18,7 @@ uninstall:
18
18
19
19
clean :
20
20
dune clean
21
- # Optionally, remove all files/folders ignored by git as defined
22
- # in .gitignore (-X).
23
21
git clean -dfXq
22
+
23
+ utop :
24
+ dune utop lib
Original file line number Diff line number Diff line change
1
+ CS51 Utilities
2
+ ==
3
+
4
+ ` cs51/utils ` contains some useful utilities for problem sets and labs
5
+ throughout CS51. The ` Absbook ` module will also be referenced
6
+ throughout the course textbook, _ Abstraction and Design in
7
+ Computation_ .
8
+
9
+
10
+ Installation
11
+ --
12
+ The fastest way to install ` cs51/utils ` is with ` opam ` :
13
+
14
+ ```
15
+ opam pin add CS51Utils ssh://git@github.com:cs51/utils.git
16
+ ```
17
+
18
+ For more information on ` opam pin ` , please consult the
19
+ [ opam documentation] ( https://opam.ocaml.org/doc/Usage.html )
20
+
21
+ The advantage of the opam-based method is that other opam packages can
22
+ depend on this one, and opam will recompile them automatically as
23
+ necessary.
24
+
25
+ ` cs51/utils ` can also be installed directly using ` make install ` and
26
+ uninstalled using ` make uninstall ` .
27
+
28
+
29
+ Tests
30
+ --
31
+
32
+ Certain parts of ` cs51/utils ` have unit tests, which can be run with
33
+ ```
34
+ $ make test
35
+ ```
36
+
37
+ Using ` cs51/utils ` in utop
38
+ --
39
+
40
+ Use ` make utop ` where DIR if the folder contains the ` dune `
41
+ file for a library. For instance, our ` sub2 ` sample library can be
42
+ used as follows:
43
+
44
+ ``` ocaml
45
+ $ dune utop sub2/lib
46
+ ...
47
+ utop # CS51Utils.Absbook.id 51 ;;
48
+ - : int = 51
49
+ ```
50
+
You can’t perform that action at this time.
0 commit comments