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 mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 7693F7EF37 for ; Wed, 8 Jul 2015 18:25:19 +0200 (CEST) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of philippe.veber@gmail.com) identity=pra; client-ip=209.85.215.41; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="philippe.veber@gmail.com"; x-sender="philippe.veber@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of philippe.veber@gmail.com designates 209.85.215.41 as permitted sender) identity=mailfrom; client-ip=209.85.215.41; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="philippe.veber@gmail.com"; x-sender="philippe.veber@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-la0-f41.google.com) identity=helo; client-ip=209.85.215.41; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="philippe.veber@gmail.com"; x-sender="postmaster@mail-la0-f41.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0BPAgCxTp1VlCnXVdFchEYGgxqvYpQRB0wBAQEBAQESAQEBAQcLCwkfMIQaIhEdARseAxIDBQEHNwIkAREBBQEiNYd2AQMSmiqNOoIFgSw+MYs/gWuCeYswChknDVeFIAEFDpMygUMFlCOLfpcYEiOBFReCTIFAPDGCSwEBAQ X-IPAS-Result: A0BPAgCxTp1VlCnXVdFchEYGgxqvYpQRB0wBAQEBAQESAQEBAQcLCwkfMIQaIhEdARseAxIDBQEHNwIkAREBBQEiNYd2AQMSmiqNOoIFgSw+MYs/gWuCeYswChknDVeFIAEFDpMygUMFlCOLfpcYEiOBFReCTIFAPDGCSwEBAQ X-IronPort-AV: E=Sophos;i="5.15,432,1432591200"; d="scan'208";a="169415583" Received: from mail-la0-f41.google.com ([209.85.215.41]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 08 Jul 2015 18:24:59 +0200 Received: by labgy5 with SMTP id gy5so76673247lab.2 for ; Wed, 08 Jul 2015 09:24:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=6EfHCXy5+GyI2wnJWqHMDf141Zfv8BqmtOXFeOr8Rwc=; b=mcXVksKjmBaICvZP7ouNi2igBL97s0iPLCOXAoHRilqUJ1V/Lsq950Ty4liEir3PIM znhnVj1402MUmKUjSrWee9JdVhXaoTAXCPbipfhyCmDeh57+lvKF+h138y93BYgoXAMD KNca+GaZvlw80GGrBdvSMoZ+LNyROYPbiN2j1c7z2VY+WDSr+pzpnfEGPUlaRFB1XbT2 MTkM0DlWuotUvYh9jzLDyW3qmgfE/eDxe0hyf+6yNs95LtvHwhjJuMYt1z5ncDuoW65f 36bOld6NNAS2wyeMlCBCCkKbN+x1xjRxQX0j1BPd3hEFS2AFHG0JDlLeJ6QfrtvMkGyt Syeg== X-Received: by 10.112.190.10 with SMTP id gm10mr10147283lbc.2.1436372699370; Wed, 08 Jul 2015 09:24:59 -0700 (PDT) MIME-Version: 1.0 Received: by 10.25.127.4 with HTTP; Wed, 8 Jul 2015 09:24:39 -0700 (PDT) From: Philippe Veber Date: Wed, 8 Jul 2015 18:24:39 +0200 Message-ID: To: caml users Content-Type: multipart/alternative; boundary=001a11c37bcc82dcb1051a5f944e X-Validation-by: philippe.veber@gmail.com Subject: [Caml-list] Unwanted type constraint in mutually recursive parameterized class type definition. --001a11c37bcc82dcb1051a5f944e Content-Type: text/plain; charset=UTF-8 Dear camlers, I obtain an unexpected answer from the toplevel when I enter the following definition: OCaml version 4.03.0+dev7-2015-02-08 # class type ['a] c = object method m : d end and d = object inherit [int] c end ;; class type ['a] c = object constraint 'a = int method m : d end and d = object method m : d end What surprises me is the constraint 'a = int in the definition of c. Is this is a bug or feature? Cheers, Philippe. --001a11c37bcc82dcb1051a5f944e Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Dear camlers,

=C2=A0 I ob= tain an unexpected answer from the toplevel when I enter the following defi= nition:

=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 OCaml version 4.03.0+dev7-2015-02-08

= # class type ['a] c =3D
=C2=A0 object
=C2=A0=C2=A0=C2=A0 method m= : d
=C2=A0 end
and d =3D
=C2=A0 object
=C2=A0=C2=A0=C2=A0 inhe= rit [int] c
=C2=A0 end
;;
class type ['a] c =3D object constra= int 'a =3D int method m : d end
and d =3D object method m : d end

What surprises me is the constraint 'a =3D int in the= definition of c. Is this is a bug or feature?

Cheers,
=C2=A0 Philippe.

--001a11c37bcc82dcb1051a5f944e--