From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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_--