option monad, and some design changes

This commit is contained in:
2021-12-19 08:08:10 +11:00
committed by aaron-jack-manning
parent 1c94d51334
commit de837bbf3b
17 changed files with 82 additions and 33 deletions

View File

@ -4,14 +4,13 @@ build:
ocamlopt -i fromStdlib.ml > fromStdlib.mli
ocamlopt -S -O3 -c fromStdlib.mli fromStdlib.ml
# types for other modules separated to easily expose without module reference in projects
ocamlopt -S -O3 -nopervasives -c types.mli types.ml
# exposed types and functions, that can be opened module wide
ocamlopt -S -O3 -nopervasives -c exposed.mli exposed.ml
# the following files make up the core custom standard library code
ocamlopt -S -O3 -nopervasives -c int.mli int.ml
ocamlopt -S -O3 -nopervasives -c float.mli float.ml
ocamlopt -S -O3 -nopervasives -c float.mli float.ml
ocamlopt -S -O3 -nopervasives -c functions.mli functions.ml
ocamlopt -S -O3 -nopervasives -c option.mli option.ml
ocamlopt -S -O3 -nopervasives -c stack.mli stack.ml
ocamlopt -S -O3 -nopervasives -c list.mli list.ml
ocamlopt -S -O3 -nopervasives -c map.mli map.ml
@ -24,7 +23,7 @@ build:
ocamlopt -S -O3 -nopervasives -c main.mli main.ml
# after all files are individually compiled with -nopervasives, this is compiled with it so that fromStdlib has the necessary linking
ocamlopt -S -O3 fromStdlib.cmx types.cmx int.cmx float.cmx functions.cmx stack.cmx list.cmx map.cmx queue.cmx set.cmx tree.cmx main.cmx -o program
ocamlopt -S -O3 fromStdlib.cmx exposed.cmx int.cmx float.cmx option.cmx stack.cmx list.cmx map.cmx queue.cmx set.cmx tree.cmx main.cmx -o program
# clean removes all except source files. autogenerated mli files are also removed.
clean: