ins
June 1, 2018, 1:44am
21
If you want to play with the language, I would recommend:
opam install utop
which will install a very nice interpreter for ocaml. Then you can do:
utop
and start typing in OCaml expressions:
utop # 1 + 4;;
- : int = 5
For compiling OCaml applications I would recommend the dune
build system .
1 Like
perry
June 1, 2018, 1:27pm
22
If you just want to see if your OCaml toplevel is working you can do a quick test from the terminal:
$ ocaml
OCaml version 4.06.0
# 1 + 4;;
- : int = 5
# exit 0;;
$
(The ;;
token tells the toplevel to evaluate what you’ve typed since the last evaluation.)
1 Like
Yongli
November 5, 2018, 9:51am
24
hi, can you help me? I use Mac with the system 10.13.6. But I can’t install Graphics package, how can I install it? I have tried lots of methods, but failed…thanks
how does one make sure one has installed the newest version of ocaml?
perry
September 14, 2019, 2:01pm
26
Install any version of opam
you like (from brew
or macports
) and then you can use opam
to build the latest release version (which is 4.08.1).