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 C86C87EEBF for ; Wed, 19 Aug 2015 00:41:04 +0200 (CEST) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of oliver@first.in-berlin.de) identity=pra; client-ip=192.109.42.8; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="oliver@first.in-berlin.de"; x-sender="oliver@first.in-berlin.de"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of oliver@first.in-berlin.de) identity=mailfrom; client-ip=192.109.42.8; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="oliver@first.in-berlin.de"; x-sender="oliver@first.in-berlin.de"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@einhorn.in-berlin.de) identity=helo; client-ip=192.109.42.8; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="oliver@first.in-berlin.de"; x-sender="postmaster@einhorn.in-berlin.de"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0AWAQBTtNNVnAgqbcBdg29pBoMfvFiHPkwBAQEBAQESAQEBAQEICwkJIS6ETYElDgKJIASsFI9jlkOQe4JSgUMFlSJvgU+CRodlB0uBQYZbkAqBOoF8gilvgkwBAQE X-IPAS-Result: A0AWAQBTtNNVnAgqbcBdg29pBoMfvFiHPkwBAQEBAQESAQEBAQEICwkJIS6ETYElDgKJIASsFI9jlkOQe4JSgUMFlSJvgU+CRodlB0uBQYZbkAqBOoF8gilvgkwBAQE X-IronPort-AV: E=Sophos;i="5.15,705,1432591200"; d="ml'?bash'?scan'208";a="143097017" Received: from einhorn.in-berlin.de ([192.109.42.8]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 19 Aug 2015 00:41:04 +0200 X-Envelope-From: oliver@first.in-berlin.de X-Envelope-To: Received: from localhost (yak.in-berlin.de [192.109.42.109]) by einhorn.in-berlin.de (8.14.4/8.14.4/Debian-4) with ESMTP id t7IMf3Rc003144 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Wed, 19 Aug 2015 00:41:03 +0200 Received: from x55b2035a.dyn.telefonica.de (x55b2035a.dyn.telefonica.de [85.178.3.90]) by webmail.in-berlin.de (Horde Framework) with HTTP; Wed, 19 Aug 2015 00:41:03 +0200 Date: Wed, 19 Aug 2015 00:41:03 +0200 Message-ID: <20150819004103.Horde.gmnxtcrVOwNtWht0UpT4DzE@webmail.in-berlin.de> From: Oliver Bandel To: caml-list@inria.fr User-Agent: Horde Application Framework 5 Content-Type: multipart/mixed; boundary="=_n2v6s5VdReiqywSCEJrJQ8d" MIME-Version: 1.0 Subject: [Caml-list] Simple exception - different behaviour between toplevel and compiled This message is in MIME format. --=_n2v6s5VdReiqywSCEJrJQ8d Content-Type: text/plain; charset=utf-8; format=flowed; DelSp=Yes Content-Disposition: inline Hello, using the attached files (executing testexc,bash) I got different results between toplevel and compiled: ===================================================== Testcase A exception A of int * int let _ = raise ( A(3,4) ) Exception: A (3, 4). Fatal error: exception Exca.A(3, 4) Fatal error: exception Exca.A(3, 4) Testcase B exception B of (int*int) let _ = raise ( B(3,4) ) Exception: B (3, 4). Fatal error: exception Excb.B(_) Fatal error: exception Excb.B(_) ===================================================== So just adding parantheses in a definition of an exception yields in these differing results, with not-shown exception-values. IMHO looks like a case for the bugtracker... OCaml version is 4.02.1 Ciao, Oliver --=_n2v6s5VdReiqywSCEJrJQ8d Content-Type: text/plain; name=exca.ml Content-Disposition: attachment; size=50; filename=exca.ml exception A of int * int let _ = raise ( A(3,4) ) --=_n2v6s5VdReiqywSCEJrJQ8d Content-Type: text/plain; name=excb.ml Content-Disposition: attachment; size=50; filename=excb.ml exception B of (int*int) let _ = raise ( B(3,4) ) --=_n2v6s5VdReiqywSCEJrJQ8d Content-Type: text/plain; name=testexc.bash Content-Disposition: attachment; size=203; filename=testexc.bash echo Testcase A FILE=exca.ml cat $FILE ocaml $FILE ocamlc $FILE ./a.out ocamlopt $FILE ./a.out echo Testcase B FILE=excb.ml cat $FILE ocaml $FILE ocamlc $FILE ./a.out ocamlopt $FILE ./a.out --=_n2v6s5VdReiqywSCEJrJQ8d--