Re: [Caml-list] Custom lexer in Camlp4

2008-06-24 Thread Jeremy Yallop
Nicolas Pouillard wrote: Excerpts from Jeremy Yallop's message of Tue Jun 24 15:03:19 +0200 2008: Is there a way to replace the default lexer in Camlp4? I'd like to use (an extended version of) one of the OCaml grammars, but with a different lexer. You can rebuild (I mean functor

Re: [Caml-list] Custom lexer in Camlp4

2008-06-24 Thread Richard Jones
On Tue, Jun 24, 2008 at 03:30:23PM +0100, Jeremy Yallop wrote: Ok, I've built a slightly modified clone of PreCast. What's the best way to persuade Camlp4 to use it? The original PreCast seems fairly hardwired, e.g. in the Register module. If you get an answer to this, please post it. I

Re: [Caml-list] Custom lexer in Camlp4

2008-06-24 Thread Andrej Bauer
On a related note: how hard would it be to convince camlp4 to translate the Coq-like context notation expr % M to the open in construct open M in expr ? Since % is already an infix operator, this shouldn't be too hard. Andrej ___ Caml-list

Re: [Caml-list] Custom lexer in Camlp4

2008-06-24 Thread Nicolas Pouillard
Excerpts from Hezekiah M. Carty's message of Tue Jun 24 17:43:52 +0200 2008: On Tue, Jun 24, 2008 at 11:16 AM, Richard Jones [EMAIL PROTECTED] wrote: On Tue, Jun 24, 2008 at 03:30:23PM +0100, Jeremy Yallop wrote: On a related note I had a crazy brainwave that we could use camlp4 to use

Re: [Caml-list] Problem with class method and polymorphic variants

2008-06-24 Thread Jacques Garrigue
From: Khoo Yit Phang [EMAIL PROTECTED] Hi, I discovered that the attached snippet of Ocaml does not compile in ocamlc, but does work in the ocaml toplevel (tested in v3.10.0 and 3.10.2). Removing anything (except the :int annotation) causes the error to go away. Is it a bug in the

Re: [Caml-list] Problem with class method and polymorphic variants

2008-06-24 Thread Khoo Yit Phang
Hi, Thanks for the quick response! I've encountered another strange one that may be related. The code below compiles only if you remove the underscore in the method _a. The error message is similar to the earlier one, but I think it's a different problem? class ['a] node d = object