From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id E8BD27FA4D for ; Fri, 1 Aug 2014 17:11:06 +0200 (CEST) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of jdimino@janestreet.com) identity=pra; client-ip=38.105.200.112; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="jdimino@janestreet.com"; x-sender="jdimino@janestreet.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of jdimino@janestreet.com designates 38.105.200.112 as permitted sender) identity=mailfrom; client-ip=38.105.200.112; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="jdimino@janestreet.com"; x-sender="jdimino@janestreet.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mxout1.mail.janestreet.com) identity=helo; client-ip=38.105.200.112; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="jdimino@janestreet.com"; x-sender="postmaster@mxout1.mail.janestreet.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtwBACOt21MmachwnGdsb2JhbABbg19XBIJ0rkiYbYFYAQmHTAGBAQgWEAEBAQEBBhYJPYQDAQEBAwESER0BASwLAQQLCwsNDR0CAiISAQUBChIGEwgKEIgMAwkIAwqld2qKMneFAgEFi00DhxkRBgqPPgQHgjgPMhKBQIUCBYlsjQyBVIVNi0cYKYR7aw X-IPAS-Result: AtwBACOt21MmachwnGdsb2JhbABbg19XBIJ0rkiYbYFYAQmHTAGBAQgWEAEBAQEBBhYJPYQDAQEBAwESER0BASwLAQQLCwsNDR0CAiISAQUBChIGEwgKEIgMAwkIAwqld2qKMneFAgEFi00DhxkRBgqPPgQHgjgPMhKBQIUCBYlsjQyBVIVNi0cYKYR7aw X-IronPort-AV: E=Sophos;i="5.01,780,1400018400"; d="scan'208";a="73631803" Received: from mxout1.mail.janestreet.com ([38.105.200.112]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 01 Aug 2014 17:11:05 +0200 Received: from tot-smtp.delacy.com ([172.27.22.15] helo=tot-smtp) by mxout1.mail.janestreet.com with esmtps (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.82) (envelope-from ) id 1XDEU3-0007OQ-E6 for caml-list@inria.fr; Fri, 01 Aug 2014 11:11:03 -0400 Received: from [172.27.229.230] (helo=mxgoog1.mail.janestreet.com) by tot-smtp with esmtps (UNKNOWN:AES256-GCM-SHA384:256) (Exim 4.72) (envelope-from ) id 1XDEU3-0003So-AM for caml-list@inria.fr; Fri, 01 Aug 2014 11:11:03 -0400 Received: from mail-ie0-f171.google.com ([209.85.223.171]) by mxgoog1.mail.janestreet.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.72) (envelope-from ) id 1XDEU3-0000QH-4t for caml-list@inria.fr; Fri, 01 Aug 2014 11:11:03 -0400 Received: by mail-ie0-f171.google.com with SMTP id at1so6119766iec.30 for ; Fri, 01 Aug 2014 08:11:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=YJud3vUv3mgN5DEiP/szi40Ryf9IyVG+7h8o3pzJcVk=; b=X4NU8hrJ80UqPJy7kP2pOFGWxfHxoPXoEQvNY69DxIc3+iWt3ShqYFdNk1SUvfnPRf 2V3KLCt8JCZTCn1Nwb6NxTjT3Smnamn+wlT4LNfaoAtcJyeZrbvm9LaTI3c8+CZzBhBj MLD0MKpmiJvte72jd393t1nbzQQWEEenOCBT8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=YJud3vUv3mgN5DEiP/szi40Ryf9IyVG+7h8o3pzJcVk=; b=TMbtZRpAuxoggRRzdHSIBjcY/6bnqbLaqYHepZWnI2rD1N0fFro6JNpR7n+qfKo5R5 bZFqx1biUKUpae5xeNL96+7Q7ATek0iCM+itDmRsRfLKnnpNNToVNAjwdRuDeTlQnn/x 8EtfEJhLU2hzekOsFcCL600vTJ1GFvXLRvr9JKMrfbsxi4mKxCn+oAvopmZQKvx3Eb6I 5iOHiuLjY+IZJG0byKNOdRqNHm+Mc+2tce5r5bIdZaX4JNks37uJ7V8FIsankRfTSqa8 OO70TvVfT0UD2En9vwWBUOXD3JKfpVxnJab/7tpVhNffZvLq/0V/avv2kM4j0pqgH0jr BiTw== X-Gm-Message-State: ALoCoQnjD9m4rXH31RB/kJ/HMIeRpCtGvnnohujjLsDttB87NTru91Z+rSWF8wK1bvRnLtCw17UphFfuxIgFtx4vNhGpMkmo1jeg9vMTX6N5kQLXelYmNHYU9c7sS5jC+V+3RxINcOaX X-Received: by 10.50.43.137 with SMTP id w9mr8866018igl.36.1406905862799; Fri, 01 Aug 2014 08:11:02 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.50.43.137 with SMTP id w9mr8865991igl.36.1406905862666; Fri, 01 Aug 2014 08:11:02 -0700 (PDT) Received: by 10.50.122.35 with HTTP; Fri, 1 Aug 2014 08:11:02 -0700 (PDT) In-Reply-To: <20140801141228.GC8964@annexia.org> References: <20140801141228.GC8964@annexia.org> Date: Fri, 1 Aug 2014 16:11:02 +0100 Message-ID: From: Jeremie Dimino To: "Richard W.M. Jones" Cc: =?UTF-8?B?S2ltIE5ndXnhu4Vu?= , "caml-list@inria.fr" Content-Type: multipart/alternative; boundary=e89a8f8388f52d5dad04ff92cccb Subject: Re: [Caml-list] Bug in camlp4 4.02 ? [ was: cduce on ocaml 4.02 ] --e89a8f8388f52d5dad04ff92cccb Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Could you fill an issue there: https://github.com/ocaml/camlp4 ? About the bug I wouldn't rely too much on #-directives to extend the syntax. There have been bugs with this in the past and it is quite annoying to fix. Passing the extensions on the command line is more reliable. On Fri, Aug 1, 2014 at 3:12 PM, Richard W.M. Jones wrote: > On Fri, Aug 01, 2014 at 01:03:19PM +0200, Kim Nguy=E1=BB=85n wrote: > > Hi Richard, hi everyone, > > > > > > On Thu, Jul 31, 2014 at 4:21 PM, Richard W.M. Jones > 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 _ =3D Ulexer ## generated from input "open Ulexer" > > > > > > let tloc (i, j) =3D (i, (* let raise =3D Pervasives.raise *) j) > > > > > > let nopos =3D ((-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 _ =3D E > > > > open F > > > > > > > > Note that if I don't go until "open E" the output file is empty > > FWIW I observe the same thing. > > Rich. > > -- > Richard Jones > Red Hat > > -- > Caml-list mailing list. Subscription management and archives: > https://sympa.inria.fr/sympa/arc/caml-list > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs > --=20 Jeremie --e89a8f8388f52d5dad04ff92cccb Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Could you fill an issue there:=C2=A0https://github.com/ocaml/camlp4 ?

<= div>About the bug I wouldn't rely too much on #-directives to extend th= e syntax. There have been bugs with this in the past and it is quite annoyi= ng to fix. Passing the extensions on the command line is more reliable.


On Fri,= Aug 1, 2014 at 3:12 PM, Richard W.M. Jones <rich@annexia.org> wrote:
On F= ri, Aug 01, 2014 at 01:03:19PM +0200, Kim Nguy=E1=BB=85n wrote:
> 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?<= br> > >
> > Currently it fails at:
> >
> > =C2=A0 File "parser/parser.ml", line 2, characters 0-6:
> > =C2=A0 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<= br> > can stumble on the same camlp4 issue:
>
> > The post-preprocessor code looks very wrong to me:
> >
> > =C2=A0 let _ =3D Ulexer =C2=A0 =C2=A0 =C2=A0## generated from inp= ut "open Ulexer"
> >
> > =C2=A0 let tloc (i, j) =3D (i, (* let raise =3D Pervasives.raise = *) j)
> >
> > =C2=A0 let nopos =3D ((-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 b= ug, 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 _ =3D E
>
> open F
>
>
>
> Note that if I don't go until "open E" the output file i= s empty

FWIW I observe the same thing.

Rich.

--
Richard Jones
Red Hat

--
Caml-list mailing list. =C2=A0Subscription management and archives:
ht= tps://sympa.inria.fr/sympa/arc/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs



--
= Jeremie
--e89a8f8388f52d5dad04ff92cccb--