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=2.5 required=5.0 tests=AWL,DNS_FROM_RFC_POST, SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 033A8BBAF for ; Mon, 6 Apr 2009 01:41:02 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AmQBAOPe2EnRVdykkGdsb2JhbACVZz8BAQEBCQkMBxEDo0uNVwEDAQOEDAaGCw X-IronPort-AV: E=Sophos;i="4.38,431,1233529200"; d="scan'208";a="27083990" Received: from mail-fx0-f164.google.com ([209.85.220.164]) by mail1-smtp-roc.national.inria.fr with ESMTP; 06 Apr 2009 01:41:00 +0200 Received: by fxm8 with SMTP id 8so1955760fxm.27 for ; Sun, 05 Apr 2009 16:41:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:cc:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:mime-version :subject:date:references:x-mailer; bh=y5owQeUvvDXm8OCbraurWBROjRWfTFIieSFEqBdg7gI=; b=jEIDo80ZdgXhnQ59D6PZ13zDfrsuXoni3ojHCtiXzfIOmEywBWlk+SXQs3iiNv9M0h oIdTYMse+AlZ2BUebQcqlYAKDHVQXZVoMNfN6dBp4oq6RlMGWBpg2iNA1pReS4gto1fm jy9pF+hBwBEEy1H9+cYfOcLD/WpbVzHjCpcNw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:cc:message-id:from:to:in-reply-to:content-type :content-transfer-encoding:mime-version:subject:date:references :x-mailer; b=ad+CHtnbwu7obvfOG7m8ZWr/iRXzdhfuWGpQbUpzqmiMqYRs2MjUOtwYg9E8SevaCj ubU9ZBbu2BCAU4nNEL+IGj+5E21TCb2pRIJzh6lcaajtAacghRQcTHg5qohChJ5oA9vt Da/PZGVMKqX7BoMh9pXwjLFW55gOZGXP6QW7c= Received: by 10.86.26.11 with SMTP id 11mr502308fgz.33.1238974860152; Sun, 05 Apr 2009 16:41:00 -0700 (PDT) Received: from ?192.168.1.34? (168-197.76-83.cust.bluewin.ch [83.76.197.168]) by mx.google.com with ESMTPS id d6sm6404666fga.22.2009.04.05.16.40.59 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 05 Apr 2009 16:40:59 -0700 (PDT) Sender: =?UTF-8?Q?Daniel_B=C3=BCnzli?= Cc: OCaml List Message-Id: From: =?ISO-8859-1?Q?Daniel_B=FCnzli?= To: Richard Jones In-Reply-To: <20090405205457.GA22985@annexia.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Apple Message framework v930.3) Subject: Re: [Caml-list] Strings Date: Mon, 6 Apr 2009 01:40:01 +0200 References: <200904031256.33357.jon@ffconsultancy.com> <200904031546.14071.jon@ffconsultancy.com> <49D63EE6.2020407@ens-lyon.org> <8697F924-0485-4E00-81DF-9BCF74D872EA@erratique.ch> <20090405205457.GA22985@annexia.org> X-Mailer: Apple Mail (2.930.3) X-Spam: no; 0.00; bunzli:01 buenzli:01 functor:01 caml-list:01 functions:01 immutable:01 strings:01 strings:01 define:02 string:02 string:02 module:03 module:03 daniel:04 daniel:04 Le 5 avr. 09 =E0 22:54, Richard Jones a =E9crit : > Could you not just define a new module which is String, but with a > restricted interface (removing all the functions that can modify > strings)? Yes. But I think that at a certain point the client will certainly =20 want a regular string and to convert from this restricted =20 representation to a string the module will have to String.copy. Best, Daniel P.S. If you have an immutable string implementation you can use the =20 functor Xmlm.Make to use them.=