Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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, 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 I tried
replacing with arbitrary numbers, and the errors at those lines

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