I'm following this paper: Introduction to Functional Programming. In the chapter on the ML language family there are examples to be run with camllight
. However, in Debian repositories, I haven't found any package that contains camllight
, so I'm using ocaml
instead:
$ ocaml
OCaml version 4.01.0
Example code from the paper worked fine until this one from the part on custom type definitions:
#type ('a,'b)sum = inl of 'a | inr of 'b;;
Trying this one out with ocaml
outputs:
# type ('a,'b)sum = inl of 'a | inr of 'b;;
Error: Syntax error
with the first of
underlined.
Why the syntax error? Is this some language feature of camllight
that is not present in ocaml
? Or can I enable it somehow?