Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
From: Jonathan Roewen <jonathan.roewen@g...>
Subject: [Caml-list] Syntax errors with match and interface files
Hi,

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:

try
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
disappear.

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

Jonathan