This project was undertaken as part of my final year, in Licence 3 (equivalent to the last year of Bachelor in France) at University Paris Diderot within the scope of a functional programming course.
See CONSIGNES.md
See INSTALL.md
- ocaml, of course
- dune and make are highly recommended
- graphics library if not already included with ocaml
By default, make is used to abbreviate the dune commands (see Makefile for more details):
-
makewithout arguments will compilemain.exeusingdune, which is your program in native code. -
make bytewill compile to bytecode if necessary, useful for running your code in an OCaml toplevel, seelsystems.top. -
make cleanto remove the temporary_builddirectory produced byduneduring its compilations.
Finally, to run your program: ./run arg1 arg2 ...
Your program must have been compiled using make byte. You should have emacs installed,
as well as an OCaml mode for emacs, such as tuareg-mode.
-
In an external file
start.mloutside the project directory, for example above theprojetdirectory, copy the contents oflsystems.topwithout its first directive (#ocaml init). Add to the#directorydirectives the necessary prefixes to access the same directories (for exampleprojet/if you are aboveprojet). -
In the same directory, open your test file under
emacs. Start it with#use "start.ml;;". Simply evaluate this directive, which will launch the interpreter: you can then perform your tests.
If the program is recompiled (always using make byte), you
will need to interrupt the interpreter with the #quit;; directive and then restart it
by reevaluating #use "start.ml;;".