🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: fa.caml
Article #136

Re: [Caml-list] Problem with the compiler 3.12.1

#136
From: Claire Dross
Date: Wed, 25 Apr 2012 08:04
33 lines
3555 bytes
On 16/04/2012 17:52, Claire Dross wrote:
> Hello,
>
> I am new to caml-list, so sorry in advance if it is not the right 
> place to make this post. In a quite important piece of ocaml code, I 
> have a function:
>
> let matching_term terms env uf id (pats, subst) (seen, forms) =
>     match pats, subst with
>       | _, [] | [], _ -> seen, forms
>       | t :: pats, _ -> fprintf fmt "   %a@." T.print t;
>         let acc = matchpats env terms uf (subst, seen, id+1) t in
>         let acc, seen, _ = List.fold_left (matchpats env env.fils uf)
>           acc pats in
>         seen, List.rev_append acc forms
>
> Removing the print in the second case of the match changes the result 
> of the compiled file (compiler 3.12.1 byte code and for linux)) on one 
> of my tests. T.print does not have side effects, it recursively prints 
> a hashconsed term structure.
>
Using the compiler 3.11.2 instead of the 3.12.1 removes the problem. My 
function returns the correct result with and without the print.

Thanks again to everyone that took time to help me,

Claire Dross

-- 
Caml-list mailing list.  Subscription management and archives:
https://sympa-roc.inria.fr/wws/info/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs
Technical Details
Message-ID: <fa.8eOQeqeDOQ7eL00qlTfSkkU2yMU@ifi.uio.no>
Path: arc1-ca.pugleaf.net!r9ni96123pbh.0!nntp.google.com!news1.google.com!news.glorb.com!uio.no!nntp.uio.no!.POSTED!not-for-mail
References: <fa.M8WQQfeGA6zwPg847g4LPWuc7BU@ifi.uio.no>

Show Full Headers
Complete Article Headers
X-Google-Thread: ff861,f44fe6ed6acb1a46
X-Google-NewGroupId: yes
X-Google-Attributes: gidc0fe4b917e,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
Received: by 10.68.211.136 with SMTP id nc8mr2043561pbc.6.1335341088584;
        Wed, 25 Apr 2012 01:04:48 -0700 (PDT)
Path: arc1-ca.pugleaf.net!r9ni96123pbh.0!nntp.google.com!news1.google.com!news.glorb.com!uio.no!nntp.uio.no!.POSTED!not-for-mail
From: Claire Dross <claire.dross@lri.fr>
Newsgroups: fa.caml
Subject: Re: [Caml-list] Problem with the compiler 3.12.1
Date: Wed, 25 Apr 2012 08:04:48 UTC
Organization: Internet mailing list
Lines: 34
Message-ID: <fa.8eOQeqeDOQ7eL00qlTfSkkU2yMU@ifi.uio.no>
References: <fa.M8WQQfeGA6zwPg847g4LPWuc7BU@ifi.uio.no>
NNTP-Posting-Host: mail-jess.uio.no
Mime-Version: 1.0
X-Trace: readme.uio.no 1335341088 3639 129.240.7.9 (25 Apr 2012 08:04:48 GMT)
X-Complaints-To: abuse@uio.no
NNTP-Posting-Date: Wed, 25 Apr 2012 08:04:48 +0000 (UTC)
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.28) Gecko/20120313 Thunderbird/3.1.20
To: caml-list@inria.fr
X-IronPort-AV: E=Sophos;i="4.75,480,1330902000"; 
   d="scan'208";a="155517024"
X-Authentication-Warning: walapai.inria.fr: sympa set sender to caml-list-owner@inria.fr using -f
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: AsICAImvl0/CYk3SmWdsb2JhbABEgx2rB4MtIgEBAQEBCAsLBxQnggkBAQUnEUARCxgJFg8JAwIBAgFFEwgBAYgPux+NUoMlBJtujTU
X-IronPort-AV: E=Sophos;i="4.75,480,1330902000"; 
   d="scan'208";a="141515646"
X-Virus-Scanned: amavisd-new at eu.adacore.com
In-Reply-To: <4F8C4054.6010407@lri.fr>
X-Sequence: 3965
List-Id: <caml-list.inria.fr>
List-Archive: <https://sympa-roc.inria.fr/wws/arc/caml-list>
List-Help: <mailto:sympa@inria.fr?subject=help>
List-Owner: <mailto:caml-list-request@inria.fr>
List-Post: <mailto:caml-list@inria.fr>
List-Subscribe: <mailto:sympa@inria.fr?subject=subscribe%20caml-list>
List-Unsubscribe: <mailto:sympa@inria.fr?subject=unsubscribe%20caml-list>
Original-Date: Wed, 25 Apr 2012 10:04:21 +0200
Original-Message-Id: <4F97B005.3090005@lri.fr>
Original-References: <4F8C4054.6010407@lri.fr>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit