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 91891BC57 for ; Sat, 1 May 2010 21:55:19 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqoCAGsk3EtDww+FkGdsb2JhbACQX4IHimABAQEBCQkMBxEDH6ougX+EX4h8AQQEAYUNBIM+ X-IronPort-AV: E=Sophos;i="4.52,311,1270418400"; d="scan'208";a="50181224" Received: from web111501.mail.gq1.yahoo.com ([67.195.15.133]) by mail2-smtp-roc.national.inria.fr with SMTP; 01 May 2010 21:55:18 +0200 Received: (qmail 66643 invoked by uid 60001); 1 May 2010 19:55:17 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1272743717; bh=QtCJSRdcHpiNgMHHhplTgVmyLvLME/0tQ3njidFP4ys=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=cjF2E9E/xiODdj2zONTA3tmb/S1wYZeq4/73cL+ixM3co4s1xvRIEEXlN0DoznvbIV3moa7dYvAuhxJzBIV4DWFVjVksuKM47SrC+fOUcRFOk87To57FWoMz/KtK9kQfKkLmFU0N8SdmrwF3iAfKaA5cBjm2m/iuwyOCoHxbzBA= DomainKey-Signature:a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=PbJi0HRew/VtMuQ1E5vr49BJaLBxxbxKd+RlhyybAz4K7xN7dvwG7Cnium479c4Y3QiHONzp/sGjGSkOvEwPs0aGN7heY5uywLUKBSS+RszPUN8P3GcTuvu35/2AvXd7dJ8rQg0npknAAoibemotateBW+FRaBYOogby+XCnAmc=; Message-ID: <602616.65342.qm@web111501.mail.gq1.yahoo.com> X-YMail-OSG: MkwQ4E8VM1mzjOd_7nsNlsfMDHD9P2u7sJ102Nhb18AfYzw y6x313IqP0JuOKqsBWLTLE_5LYgUktEO.0nO5rBfP8UDIyB_FIhZiFe8dBF6 qFVBoJPJA8SRgy8gChOxURXByqMtFQalNjgvMyoTB8tiO5v2uFyoZRv2SpLV pdSw9ciRLUhj.laS2l72r7AMb6Hs1bvqnQsm8Ot.owVd.A0XixuWTtr98PzW 4_AUXEQB4a1HMLQtMm_yicL13.YMQVwtRbu1PXvACOuQnyzEQ7gagIcLDTOf AdY0E9im7EvlDLRoJ1fWRme24d2q01oaCT7UrpfOpePPOw1yQbu_8kkWrpgk v75R9h9MIaeiZiv8ZH5ucBoY66i99MeE- Received: from [213.205.71.60] by web111501.mail.gq1.yahoo.com via HTTP; Sat, 01 May 2010 12:55:17 PDT X-Mailer: YahooMailClassic/10.1.11 YahooMailWebService/0.8.103.269680 Date: Sat, 1 May 2010 12:55:17 -0700 (PDT) From: Dario Teixeira Subject: Re: [Caml-list] Subtyping structurally-equivalent records, or something like it? To: caml-list@yquem.inria.fr, Anthony Tavener MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam: no; 0.00; subtyping:01 cheers:01 velocity:98 caml-list:01 precisely:01 suggestion:03 discusses:04 ang:04 types:05 problem:05 phantom:07 attributes:08 sort:12 i've:12 moreover:13 Hi,=0A=0A> type kinematic =3D { lin: Vec.t; ang: Vec.t }=0A>=0A> Which I'v= e been using to represent a medley of physical attributes (force, > momentu= m, velocity, etc.).=0A=0AI second St=E9phane's suggestion of using phantom = types; moreover,=0AI recommend you read an article that discusses them to s= ome detail=0Aand covers their use for precisely this sort of problem:=0Ahtt= p://camltastic.blogspot.com/2008/05/phantom-types.html=0A=0ACheers,=0ADario= Teixeira=0A=0A=0A=0A