From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id 1824BBC37 for ; Sat, 2 Jan 2010 17:46:12 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AuoBAFIHP0vRVdrVkGdsb2JhbACDYI93hzA/AQEBAQkJDAcTA6oAjASBLYIuVgQ X-IronPort-AV: E=Sophos;i="4.47,489,1257116400"; d="scan'208";a="53111460" Received: from mail-bw0-f213.google.com ([209.85.218.213]) by mail4-smtp-sop.national.inria.fr with ESMTP; 02 Jan 2010 17:46:11 +0100 Received: by bwz5 with SMTP id 5so8831128bwz.3 for ; Sat, 02 Jan 2010 08:46:11 -0800 (PST) MIME-Version: 1.0 Received: by 10.204.160.86 with SMTP id m22mr9683483bkx.82.1262450770989; Sat, 02 Jan 2010 08:46:10 -0800 (PST) In-Reply-To: References: Date: Sat, 2 Jan 2010 17:46:10 +0100 Message-ID: <7d8707de1001020846s29332a67j21878751ed3da22@mail.gmail.com> Subject: Re: [Caml-list] Re: value restriction From: Andrej Bauer To: Jacques Le Normand Cc: caml-list caml-list Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam: no; 0.00; andrej:01 andrej:01 foo:01 baz:01 baz:01 val:01 foo:01 caml-list:01 int:01 caml:02 objective:02 W4:96 W4:96 let:03 let:03 > on another note (but staying very much on the same topic), why won't the > following generalize: > # let foo =3D > =C2=A0=C2=A0 =C2=A0let counter =C2=A0=3D ref 0 in > =C2=A0=C2=A0 =C2=A0let bar =3D !counter =C2=A0in > =C2=A0=C2=A0 =C2=A0let baz =3D fun x -> bar > =C2=A0=C2=A0 =C2=A0in > =C2=A0=C2=A0 =C2=A0 =C2=A0baz > > val foo : '_a -> int =3D It's even worse: Objective Caml version 3.11.1 # let _ =3D ref () in fun x -> x ;; - : '_a -> '_a =3D I am sure this makes sense in France. Happy new year! Andrej