From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=AWL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id 346CABC6B for ; Sun, 10 Feb 2008 20:22:55 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAGrdrkfAXQInh2dsb2JhbACQOwEBAQgKKZUu X-IronPort-AV: E=Sophos;i="4.25,330,1199660400"; d="scan'208";a="9005885" Received: from concorde.inria.fr ([192.93.2.39]) by mail3-smtp-sop.national.inria.fr with ESMTP; 10 Feb 2008 20:22:54 +0100 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id m1AJMsYO005232 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Sun, 10 Feb 2008 20:22:54 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAKfdrkfBMVMPh2dsb2JhbACQOwEBAQgKKZUu X-IronPort-AV: E=Sophos;i="4.25,330,1199660400"; d="scan'208";a="7875748" Received: from kabis.univ-orleans.fr (HELO ka.univ-orleans.fr) ([193.49.83.15]) by mail1-smtp-roc.national.inria.fr with ESMTP; 10 Feb 2008 20:22:54 +0100 Received: from smtps.univ-orleans.fr (localhost [127.0.0.1]) by ka.univ-orleans.fr (Postfix) with ESMTP id C251312B0CE; Sun, 10 Feb 2008 20:22:53 +0100 (CET) Received: from [192.168.0.12] (ras75-4-82-235-58-110.fbx.proxad.net [82.235.58.110]) by smtps.univ-orleans.fr (Postfix) with ESMTP id 2650F36E5B; Sun, 10 Feb 2008 20:22:57 +0100 (CET) Subject: Re: [Caml-list] Fine-grained types with more general library From: David Teller To: Dawid Toton Cc: Caml List In-Reply-To: <47AF4B6E.3070306@uj.edu.pl> References: <47AF4B6E.3070306@uj.edu.pl> Content-Type: text/plain Date: Sun, 10 Feb 2008 20:22:50 +0100 Message-Id: <1202671370.6278.11.camel@Blefuscu> Mime-Version: 1.0 X-Mailer: Evolution 2.12.1 Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 47AF4F0E.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; fine-grained:01 univ-orleans:01 val:01 val:01 cheers:01 univ-orleans:01 lifo:01 liquidations:98 caml-list:01 string:02 unit:03 unit:03 library:03 types:05 types:05 I'm not sure I understand the question. Still, if you haven't used phantom types yet, it sounds like the right thing to do: type 'a path = string list type remote_t = Remote path type local_t = Local path Now, you can write things such as val print_local : Local path -> unit (*only works on local paths*) val print_remote: Remote path -> unit (*only works on remote paths*) val print_any : 'a path -> unit (*works with either*) Does this help you ? Cheers, David -- David Teller Security of Distributed Systems http://www.univ-orleans.fr/lifo/Members/David.Teller Angry researcher: French Universities need reforms, but the LRU act brings liquidations.