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 1DABD800BE for ; Fri, 10 Feb 2017 17:44:03 +0100 (CET) Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=sjs429@cornell.edu; spf=Pass smtp.mailfrom=sjs429@cornell.edu; spf=Pass smtp.helo=postmaster@limerock02.mail.cornell.edu Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of sjs429@cornell.edu) identity=pra; client-ip=128.84.13.242; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="sjs429@cornell.edu"; x-sender="sjs429@cornell.edu"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of sjs429@cornell.edu designates 128.84.13.242 as permitted sender) identity=mailfrom; client-ip=128.84.13.242; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="sjs429@cornell.edu"; x-sender="sjs429@cornell.edu"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of postmaster@limerock02.mail.cornell.edu designates 128.84.13.242 as permitted sender) identity=helo; client-ip=128.84.13.242; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="sjs429@cornell.edu"; x-sender="postmaster@limerock02.mail.cornell.edu"; x-conformance=sidf_compatible; x-record-type="v=spf1" IronPort-PHdr: =?us-ascii?q?9a23=3AtLuYvxEiNfM6ddWYT6X1f51GYnF86YWxBRYc798d?= =?us-ascii?q?s5kLTJ7zpc6wAkXT6L1XgUPTWs2DsrQf2raQ4/+rCT1IyK3CmUhKSIZLWR4BhJ?= =?us-ascii?q?detC0bK+nBN3fGKuX3ZTcxBsVIWQwt1Xi6NU9IBJS2PAWK8TW94jEIBxrwKxd+?= =?us-ascii?q?KPjrFY7OlcS30P2594HObwlSijewZbx/IA+1oAjTucUbgo9vIbstxxXUpXdFZ/?= =?us-ascii?q?5Yzn5yK1KJmBb86Maw/Jp9/ClVpvks6c1OX7jkcqohVbBXAygoPG4z5M3wqBnM?= =?us-ascii?q?VhCP6WcGUmUXiRVHHQ7I5wznU5jrsyv6su192DSGPcDzULs5Vyiu47ttRRT1ky?= =?us-ascii?q?oMKSI3/3/LhcxxlKJboQyupxpjw47PfYqZMONycr7Bcd8GQGZMWNtaWS5cDYOm?= =?us-ascii?q?d4YBD+QPM+VFoYfju1QDtgGxCRW2Ce711jNEmn370Ksn2OohCwHG2wkgEsoTvn?= =?us-ascii?q?TIstr1OqkSXv6zzKLV0DvDavRW2TP+6IfSbxsspuqMXbd3ccrVykkgDRjIgUmL?= =?us-ascii?q?qYD/IzyV0f4Ns26F4OpkUeKjkXAopBxsojW2wMonl4rHhpoNx1zZ6yl0w5w5KN?= =?us-ascii?q?63RUJhfNKpHoFcuz+VOodoWs8uXX1ktSIgxrAFuZO3ZjYGxIk7yxLFdvCKd4qF?= =?us-ascii?q?7xT+X+iLOzh4nmhqeLenihay70egzur8W9Gw0FZLqypKjMPMtncR2BzQ9sSLVO?= =?us-ascii?q?Fx/kK71jaO0wDf8P1LIUculardNZEhxrowmoANvkveAy/6gET2jKmIeUU44uWk?= =?us-ascii?q?9vrrb7b8qpKfOIJ4kBzyP6o0lsChDuk0LBACX22B9uS90L3j81f5QLJPjvAuia?= =?us-ascii?q?nZsovaKMsFqqO9GAJazoEj6wy5Dzi41NQYmWMLI0xYdxKal4TpIU3BIOjkDfej?= =?us-ascii?q?hFShiCtkyOrDPr3lG5nNKnnDkKz9fbtm8E5dyA8zzchF6J5OC7EBJujzWk7ru9?= =?us-ascii?q?DCAB85KV/8/+GyLNh6nrweWH6CSvudPaT6tUeXvL9pJeSQMstdkz/4L7AB5uXy?= =?us-ascii?q?xSsykFoZOK2oxoc/aXaiH/0gLV/PMlT2hdJUKnsHsAQzSqTRjVqGUjcbM223WK?= =?us-ascii?q?Y/7xkwE8StCp3FS4SpxrGNwXHoTdVtemlaBwXUQj/TfIKeVqJJMXrKLw=3D=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0CNAAAv7Z1Yh/INVIBeHAEBBAEBCgEBF?= =?us-ascii?q?wEBBAEBCgEBhF0DOINSgTaJRJEZgmKUYokVB0IVAQEBAQEBAQEBAQESAQEBCgs?= =?us-ascii?q?JCh0vgjMbAYIRCwQkWwwKAwEHNwIkEgEFASIBigIIBaNCP4wCgiWIAgeDdBKLK?= =?us-ascii?q?Ydagl8BBJBBizGSFJEFkU4UHoEVNYEgHxMIFxM8FwWDZIJginUBAQE?= X-IPAS-Result: =?us-ascii?q?A0CNAAAv7Z1Yh/INVIBeHAEBBAEBCgEBFwEBBAEBCgEBhF0?= =?us-ascii?q?DOINSgTaJRJEZgmKUYokVB0IVAQEBAQEBAQEBAQESAQEBCgsJCh0vgjMbAYIRC?= =?us-ascii?q?wQkWwwKAwEHNwIkEgEFASIBigIIBaNCP4wCgiWIAgeDdBKLKYdagl8BBJBBizG?= =?us-ascii?q?SFJEFkU4UHoEVNYEgHxMIFxM8FwWDZIJginUBAQE?= X-IronPort-AV: E=Sophos;i="5.35,142,1484002800"; d="scan'208,217";a="212810625" Received: from limerock02.mail.cornell.edu ([128.84.13.242]) by mail3-smtp-sop.national.inria.fr with ESMTP; 10 Feb 2017 17:44:01 +0100 X-CornellRouted: This message has been Routed already. Received: from exchange.cornell.edu (sf-e2013-08.exchange.cornell.edu [10.22.40.55]) by limerock02.mail.cornell.edu (8.14.4/8.14.4_cu) with ESMTP id v1AGhxbK010680 for ; Fri, 10 Feb 2017 11:44:00 -0500 Received: from sf-e2013-01.exchange.cornell.edu (10.22.40.48) by sf-e2013-08.exchange.cornell.edu (10.22.40.55) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Fri, 10 Feb 2017 11:43:45 -0500 Received: from mail-wj0-f197.google.com (209.85.210.197) by exchange.cornell.edu (10.22.40.48) with Microsoft SMTP Server (TLS) id 15.0.1210.3 via Frontend Transport; Fri, 10 Feb 2017 11:43:45 -0500 Received: by mail-wj0-f197.google.com with SMTP id c7so10584465wjb.7 for ; Fri, 10 Feb 2017 08:43:55 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:from:date:message-id:subject :to; bh=SPfKUT8uGz5aQNsL+tLMuV+vjWATaHDUZZCYQVI89OY=; b=Rob/hjRci9ruERvmITTRed1dfRhEsq3Mb6r2aUVw8gjmcctNd1jyO5aPNQKPPVcKtk frkJF3K3pF884kLnmMCc8t/igZvpwyXudxC0Bq0MV22W1JgLo9rekEL3X9iJO0n0B9Ui Mk/6CAkslIv2GBbahJVR8JzFmAulrrADjlMy9aG9Qdtro9NX6ophheRXMtqv4u8P+F6s 1Dg366m+JXF5Nu/vj+TEQrbJKbEJKktb/Kt9sHEtkL8L99MGOtj85YO2xdD1jefankJ/ wzhK/nSz53HOIZeR5jDoRgTi47JgmIjEAmzoZBb99LbOaGCxMH3u5S5wSUBSaNodnaWQ 1T1A== X-Gm-Message-State: AMke39nUrJ7g63WSsd7DYFDgmnOWyY0U0uJ7+vG3W79wfSMA2odGO9Vl1S7yhtWbkbIgmesBBdp+XMD8J6uqgZGAH7STN4hAfHI8GaDm2zoSs1UfaJjv3DEtjyduHdKJ/SrMII/J58tURpDOEQO9Tmnsmo+0d/Bnzw== X-Received: by 10.28.61.136 with SMTP id k130mr8085218wma.128.1486745035045; Fri, 10 Feb 2017 08:43:55 -0800 (PST) X-Received: by 10.28.61.136 with SMTP id k130mr8085191wma.128.1486745034593; Fri, 10 Feb 2017 08:43:54 -0800 (PST) MIME-Version: 1.0 Sender: Received: by 10.28.87.132 with HTTP; Fri, 10 Feb 2017 08:43:54 -0800 (PST) From: Steffen Smolka Date: Fri, 10 Feb 2017 11:43:54 -0500 X-Google-Sender-Auth: vTQuBBBxaIqmhu2VKqPLnMHiCbQ Message-ID: To: Leo White , Caml List Content-Type: multipart/alternative; boundary="001a114b7560a8a99d05482fcd9a" X-ORG-HybridRouting: faea2173f1b16ce77dabc6c262450991 X-ORG-RouteOnPrem: False X-ORG-MsgSource: cmail X-PMX-CORNELL-AUTH-RESULTS: dkim-out=none; Subject: Re: [Caml-list] extend object type? --001a114b7560a8a99d05482fcd9a Content-Type: text/plain; charset="UTF-8" Thanks, this will do! The #t1 syntax is something else I was looking for. -- Steffen > You can't do it for object types directly, but you can do it for class > types: > class type t1 = object method f : int end > class type t2 = object inherit t1 method g : bool end > Defining a class type also defines the corresponding object type, which > means the above results in types called t1 and t2 that are equal to the > ones you want. > This trick also lets you use #t2 to refer to the polymorphic type < f : > int; g : bool; .. >. > Regards, > Leo --001a114b7560a8a99d05482fcd9a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks, this will do! The #t1 syntax is something els= e I was looking for.

-- Steffen

=C2=A0
You ca= n't do it for object types directly, but you can do it for class types:=
=C2=A0 class type t1 =3D object method f : int end
=C2=A0 class type= t2 =3D object inherit t1 method g : bool end
Defining a class type also= defines the corresponding object type, which means the above results in ty= pes called t1 and t2 that are equal to the ones you want.
This trick als= o lets you use #t2 to refer to the polymorphic type < f : int; g : bool;= .. >.
Regards,
Leo

--001a114b7560a8a99d05482fcd9a--