syntax puzzle
| Newsgroups | gmane.comp.lang.ocaml.beginners |
|---|---|
| Message-ID | <[email protected]> |
Whi do I get a syntax error
hendrik@notlookedfor:~/dv/lang/experiment/autometa$ ocamlc ko.ml -o ko
File "ko.ml", line 4, characters 10-11:
Error: Syntax error
for the following code:
hendrik@notlookedfor:~/dv/lang/experiment/autometa$ cat ko.ml
type exp =
(* type constructors *)
Pity of {source : exp; target : exp}
;;
hendrik@notlookedfor:~/dv/lang/experiment/autometa$
bot not:
hendrik@notlookedfor:~/dv/lang/experiment/autometa$ ocamlc ok.ml -o ok
hendrik@notlookedfor:~/dv/lang/experiment/autometa$
for this code:?
hendrik@notlookedfor:~/dv/lang/experiment/autometa$ cat ok.ml
type exp =
(* type constructors *)
Pity of xxx
and xxx = {source : exp; target : exp}
;;
hendrik@notlookedfor:~/dv/lang/experiment/autometa$
Am I really required to have an actual name after the 'of'? I haven't
noticed a restriction like that anywhere else in the language.
I suspect something else is going on, but I'm at a loss to know what.
-- hendrik