From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id B16A1BBAF for ; Fri, 26 Nov 2010 17:22:03 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArYAAMNs70xVnoqzkWdsb2JhbACjJAEBAQEJCwoHEQUXBsBChUcEjgo X-IronPort-AV: E=Sophos;i="4.59,261,1288566000"; d="scan'208,217";a="81050859" Received: from mail169.messagelabs.com ([85.158.138.179]) by mail2-smtp-roc.national.inria.fr with SMTP; 26 Nov 2010 17:22:03 +0100 X-VirusChecked: Checked X-Env-Sender: christoph.bauer@lmsintl.com X-Msg-Ref: server-5.tower-169.messagelabs.com!1290788522!41231944!1 X-StarScan-Version: 6.2.9; banners=-,-,- X-Originating-IP: [213.68.136.230] Received: (qmail 30446 invoked from network); 26 Nov 2010 16:22:02 -0000 Received: from kaiserslautern1.lms-gmbh.de (HELO mail-kl.lmsintl.com) (213.68.136.230) by server-5.tower-169.messagelabs.com with SMTP; 26 Nov 2010 16:22:02 -0000 Received: from KAIP-EXHUB01.lmsintl.com (unknown [10.2.100.90]) by mail-kl.lmsintl.com (Postfix) with ESMTP id 925D21480048 for ; Fri, 26 Nov 2010 17:10:35 +0100 (CET) Received: from KAIP-EXMSG01.lmsintl.com ([10.2.100.91]) by KAIP-EXHUB01.lmsintl.com ([10.2.100.90]) with mapi; Fri, 26 Nov 2010 17:22:02 +0100 From: Christoph Bauer To: "caml-list@inria.fr" Date: Fri, 26 Nov 2010 17:22:01 +0100 Subject: Marshal and exceptions Thread-Topic: Marshal and exceptions Thread-Index: AcuNhg5J8QWLMok8R/qs8p40/YiOIQ== Message-ID: <9A8556989A396A408C72088C69EDE563A3E8F8CE@KAIP-EXMSG01.lmsintl.com> Accept-Language: de-DE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: de-DE, en-US Content-Type: multipart/alternative; boundary="_000_9A8556989A396A408C72088C69EDE563A3E8F8CEKAIPEXMSG01lmsi_" MIME-Version: 1.0 X-Spam: no; 0.00; ocaml:01 ocaml:01 exceptions:01 marshal:01 marshal:01 expression:02 expression:02 match:02 match:02 string:02 string:02 arial:96 arial:96 christoph:04 christoph:04 --_000_9A8556989A396A408C72088C69EDE563A3E8F8CEKAIPEXMSG01lmsi_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi, why is the result 2 of the following expression? match Marshal.from_string (Marshal.to_string (Failure "test") []) 0 with Failure _ -> 1 | _ -> 2 ;; Ocaml 3.11.2. TIA, Christoph Bauer --_000_9A8556989A396A408C72088C69EDE563A3E8F8CEKAIPEXMSG01lmsi_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
Hi,
 
why is th= e result 2=20 of the following expression? 
 
match=20 Marshal.from_string (Marshal.to_string (Failure "test") []) 0=20 with
    Failure _ -> 1
  | _ ->=20 2    ;;
 
Ocaml=20 3.11.2.
 
TIA,
Christoph= =20 Bauer
--_000_9A8556989A396A408C72088C69EDE563A3E8F8CEKAIPEXMSG01lmsi_-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 6311EBBAF for ; Fri, 26 Nov 2010 19:26:17 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ah0MAIaK70wSB0QjhWdsb2JhbACUW4YpAYgDCBUBAQEKCwoFExwGiCyeG5EAiGaFRwSBXIMAhgU X-IronPort-AV: E=Sophos;i="4.59,262,1288566000"; d="scan'208";a="89456958" Received: from dmz-mailsec-scanner-6.mit.edu ([18.7.68.35]) by mail1-smtp-roc.national.inria.fr with ESMTP; 26 Nov 2010 19:26:16 +0100 X-AuditID: 12074423-b7bd0ae000000a00-fb-4ceffbc7778b Received: from mailhub-auth-4.mit.edu ( [18.7.62.39]) by dmz-mailsec-scanner-6.mit.edu (Symantec Brightmail Gateway) with SMTP id 5D.41.02560.7CBFFEC4; Fri, 26 Nov 2010 13:26:15 -0500 (EST) Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id oAQIQF0Z013695 for ; Fri, 26 Nov 2010 13:26:15 -0500 Received: from mail-yw0-f54.google.com (mail-yw0-f54.google.com [209.85.213.54]) (authenticated bits=0) (User authenticated as mflin@ATHENA.MIT.EDU) by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id oAQIQELv005000 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NOT) for ; Fri, 26 Nov 2010 13:26:15 -0500 (EST) Received: by ywp6 with SMTP id 6so25785908ywp.27 for ; Fri, 26 Nov 2010 10:26:14 -0800 (PST) Received: by 10.90.98.12 with SMTP id v12mr1534024agb.109.1290795974231; Fri, 26 Nov 2010 10:26:14 -0800 (PST) MIME-Version: 1.0 Received: by 10.90.178.12 with HTTP; Fri, 26 Nov 2010 10:25:53 -0800 (PST) X-Originating-IP: [68.81.200.117] In-Reply-To: <9A8556989A396A408C72088C69EDE563A3E8F8CE@KAIP-EXMSG01.lmsintl.com> References: <9A8556989A396A408C72088C69EDE563A3E8F8CE@KAIP-EXMSG01.lmsintl.com> From: Mike Lin Date: Fri, 26 Nov 2010 13:25:53 -0500 Message-ID: Subject: Re: [Caml-list] Marshal and exceptions To: "caml-list@inria.fr" Content-Type: multipart/alternative; boundary=0016363108ab858ab80495f8dbbd X-Brightmail-Tracker: AAAABRFDBf4Wwph/FsM2bhbDWxUWw1sa X-Spam: no; 0.00; mikelin:01 ocaml:01 beginner's:01 ocaml:01 bug:01 beginner's:01 bug:01 1961:98 26,:98 1961:98 26,:98 beginners:01 beginners:01 wrote:01 wrote:01 --0016363108ab858ab80495f8dbbd Content-Type: text/plain; charset=ISO-8859-1 http://caml.inria.fr/mantis/view.php?id=1961 On Fri, Nov 26, 2010 at 11:22 AM, Christoph Bauer < christoph.bauer@lmsintl.com> wrote: > Hi, > > why is the result 2 of the following expression? > > match Marshal.from_string (Marshal.to_string (Failure "test") []) 0 with > Failure _ -> 1 > | _ -> 2 ;; > > Ocaml 3.11.2. > > TIA, > Christoph Bauer > > _______________________________________________ > Caml-list mailing list. Subscription management: > http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list > Archives: http://caml.inria.fr > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs > > --0016363108ab858ab80495f8dbbd Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable http://caml.inri= a.fr/mantis/view.php?id=3D1961

On Fri= , Nov 26, 2010 at 11:22 AM, Christoph Bauer <christoph.bauer@lmsintl.com>= wrote:
Hi,
=A0
why is the result 2=20 of the following=A0expression?=A0
=A0
match=20 Marshal.from_string (Marshal.to_string (Failure "test") []) 0=20 with
=A0=A0=A0 Failure _ -> 1
=A0 | _ ->=20 2=A0=A0=A0 ;;
=A0
Ocaml=20 3.11.2.
=A0
TIA,
Christoph=20 Bauer

_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http://caml.in= ria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs


--0016363108ab858ab80495f8dbbd-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id EFD06BBAF for ; Fri, 26 Nov 2010 22:58:11 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqUBADe870xKfVK2kGdsb2JhbACjCAgVAQEBAQkJDAcRAx+ILJ1liWSCGIR1LohWAQEDBYVCBI5XhyQ X-IronPort-AV: E=Sophos;i="4.59,262,1288566000"; d="asc'?scan'208";a="68154017" Received: from mail-wy0-f182.google.com ([74.125.82.182]) by mail3-smtp-sop.national.inria.fr with ESMTP; 26 Nov 2010 22:58:11 +0100 Received: by wyf19 with SMTP id 19so17030276wyf.27 for ; Fri, 26 Nov 2010 13:58:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type; bh=CgljD25yHd43zSVQ94s1BGsurgSS/592zjrwd7564+4=; b=jg8sUN7x5qJyuCs+fO/39wx1oBgJIVfjTPTH8nkSIRJMA4V9pBMU0ugFDtFhzYz8FG Mgy91GrPUFWHdnPMi4T3gHc5HFbPKYEQOkHQ+dQLc1/TpmqJeUvTPi6DY5sDqJnR+t6y ZdUpUWOsXICEvQ7f/5x8PVyWp/BxyR2q4BPA8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type; b=ODPJsdqWX0r1WkmJzWf2vCXwLBFE5pgVyhDIiL5EuJCYxeJJ7hf/L0EnYVzPD66jsJ RlHUEJre09fd51cp0E+Bl39v9ThV2cxXrb6xxpXEdIBP5xNt594sM51Nzobp6usJbRJV 9SLiSRwhf6qNWjX/8RCvNZ24SMGkxqc3R1wo4= Received: by 10.227.138.147 with SMTP id a19mr2949265wbu.225.1290808689865; Fri, 26 Nov 2010 13:58:09 -0800 (PST) Received: from macbookpro.local (bin73-1-78-240-16-62.fbx.proxad.net [78.240.16.62]) by mx.google.com with ESMTPS id f14sm1623845wbe.14.2010.11.26.13.58.07 (version=SSLv3 cipher=RC4-MD5); Fri, 26 Nov 2010 13:58:08 -0800 (PST) Message-ID: <4CF02D69.5010707@univ-savoie.fr> Date: Fri, 26 Nov 2010 22:58:01 +0100 From: Christophe Raffalli User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; fr; rv:1.9.2.12) Gecko/20101027 Thunderbird/3.1.6 MIME-Version: 1.0 To: Mike Lin Cc: "caml-list@inria.fr" Subject: Re: [Caml-list] Marshal and exceptions References: <9A8556989A396A408C72088C69EDE563A3E8F8CE@KAIP-EXMSG01.lmsintl.com> In-Reply-To: X-Enigmail-Version: 1.1.1 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig6EC3281C04238A90BECF3BD9" X-Spam: no; 0.00; christophe:01 raffalli:01 marshalling:01 cheers:01 christophe:01 1961:98 exception:01 exception:01 caml-list:01 exceptions:01 marshal:01 caml:02 raise:03 rfc:05 ecrit:06 X-Attachments: type="application/pgp-signature" name="signature.asc" name="signature.asc" This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig6EC3281C04238A90BECF3BD9 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Le 26/11/10 19:25, Mike Lin a =E9crit : > http://caml.inria.fr/mantis/view.php?id=3D1961 OK, but then if you are not allowed to marshall exception, marshalling an exception should raise an exception ... Cheers, Christophe --------------enig6EC3281C04238A90BECF3BD9 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkzwLW0ACgkQi9jr/RgYAS5vIQCg0oTJsCQLAYPPmIhJtIR+UJ2A m08AnixElzsCHM2y84d5+xSbpZMjzdty =k+wB -----END PGP SIGNATURE----- --------------enig6EC3281C04238A90BECF3BD9--