caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Re: [Caml-list] Bug in camlp4 4.02 ? [ was: cduce on ocaml 4.02 ]
@ 2014-08-01 11:03 Kim Nguyễn
  2014-08-01 14:12 ` Richard W.M. Jones
  0 siblings, 1 reply; 6+ messages in thread
From: Kim Nguyễn @ 2014-08-01 11:03 UTC (permalink / raw)
  To: Richard W.M. Jones; +Cc: caml-list

Hi Richard, hi everyone,


On Thu, Jul 31, 2014 at 4:21 PM, Richard W.M. Jones <rich@annexia.org> wrote:
>
> I wonder if anyone has managed to compile cduce with OCaml 4.02?
>
> Currently it fails at:
>
>   File "parser/parser.ml", line 2, characters 0-6:
>   Error: Unbound constructor Ulexer

note: for me it "fails" (I kill ocamlopt) before because of a long
forgotten -inline 10000 that makes ocaml generate a large ( >90 MB .s
file on which "as" takes a lot of time, for typing/typer.ml), putting
a saner -inline 100 in Makefile.distribg makes the file compile and I
can stumble on the same camlp4 issue:

> The post-preprocessor code looks very wrong to me:
>
>   let _ = Ulexer      ## generated from input "open Ulexer"
>
>   let tloc (i, j) = (i, (* let raise = Pervasives.raise *) j)
>
>   let nopos = ((-1), (-1))
>
> It could be a bug in camlp4?

The following test cases exhibit the problematic behavior of camlp4 (I
don't know if it's just an intended change in behaviour or a bug, I
don't mind filling a bug report in the latter case):

bug1.ml -----------------------
#load "pa_extend.cmo";;

open A
open B
open C
open D
open E

bug2.ml -----------------------

#load "pa_extend.cmo";;

open A
open B
open C
open D
open E
open F

$ camlp4 -version
4.02.0+dev12-2014-07-30

$ camlp4o bug1.ml
E

$ camlp4o bug2.ml
let _ = E

open F



Note that if I don't go until "open E" the output file is empty

with camlp4 from ocaml 4.01.0, everything works as expected (that is
the #load is absent from the output, and all the open A...F are
present in the output).


Cheers,
-- 
Kim

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-08-02 13:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-01 11:03 [Caml-list] Bug in camlp4 4.02 ? [ was: cduce on ocaml 4.02 ] Kim Nguyễn
2014-08-01 14:12 ` Richard W.M. Jones
2014-08-01 15:11   ` Jeremie Dimino
2014-08-01 16:31     ` Kim Nguyễn
2014-08-02 12:35       ` Richard W.M. Jones
2014-08-02 13:11         ` Kim Nguyễn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).