English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
[Caml-list] Syntax errors with match and interface files
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2005-07-21 (23:52)
From: Jonathan Roewen <jonathan.roewen@g...>
Subject: [Caml-list] Syntax errors with match and interface files

I'm getting a curious syntax error:

in my Key.mli file, I have:

val kEnter: int;
val kBksp: int;

then, in Console.ml, I'm trying something like:

let put c = putch c; Queue.add c buffer in
match char_code with
| Key.kEnter -> put '\n'
| Key.kBksp -> put '\b'
| ch -> put (Key.to_char ch)
with Key.Not_printable -> ()

but I get a syntax error at any match case with Key.xxx. I tried
replacing with arbitrary numbers, and the errors at those lines

Is this a problem with the ocaml[opt] compiler?