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 mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by sympa.inria.fr (Postfix) with ESMTPS id 572997F1DD for ; Fri, 11 Jan 2013 06:08:11 +0100 (CET) Received-SPF: None (mail4-smtp-sop.national.inria.fr: no sender authenticity information available from domain of berenger@riken.jp) identity=pra; client-ip=134.160.33.161; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="berenger@riken.jp"; x-sender="berenger@riken.jp"; x-conformance=sidf_compatible Received-SPF: Pass (mail4-smtp-sop.national.inria.fr: domain of berenger@riken.jp designates 134.160.33.161 as permitted sender) identity=mailfrom; client-ip=134.160.33.161; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="berenger@riken.jp"; x-sender="berenger@riken.jp"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: Pass (mail4-smtp-sop.national.inria.fr: domain of postmaster@postman.riken.jp designates 134.160.33.161 as permitted sender) identity=helo; client-ip=134.160.33.161; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="berenger@riken.jp"; x-sender="postmaster@postman.riken.jp"; x-conformance=sidf_compatible; x-record-type="v=spf1" X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: At0BACad71CGoCGhhWdsb2JhbABEvGgEBIEeDgEBAQgNCwUWJ4JdQD0WGAMCAQIBPwwNCAEBiBWWSZ4wkR8DiF6NLIEchE+NYg X-IronPort-AV: E=Sophos;i="4.84,449,1355094000"; d="scan'208";a="168072214" Received: from postman1.riken.jp (HELO postman.riken.jp) ([134.160.33.161]) by mail4-smtp-sop.national.inria.fr with ESMTP; 11 Jan 2013 06:08:09 +0100 Received: from postman.riken.jp (postman1.riken.jp [127.0.0.1]) by postman.riken.jp (Postfix) with SMTP id 8569532C021F for ; Fri, 11 Jan 2013 14:08:05 +0900 (JST) Received: from [172.27.98.103] (rikad98.riken.jp [134.160.214.98]) by postman.riken.jp (Postfix) with ESMTPA id 50DCA32A0047 for ; Fri, 11 Jan 2013 14:08:05 +0900 (JST) Message-ID: <50EF9E2B.1010100@riken.jp> Date: Fri, 11 Jan 2013 14:07:55 +0900 From: Francois Berenger User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: caml-list Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-PMX-Version: 5.6.0.2009776, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2013.1.11.45723 Subject: [Caml-list] adding a function to an already existing module Hello, Let's say I want to add a function to the List module of the std lib. I'd like to do this without having to change list.ml in the std lib. And, my function need to have access to everything available in list.ml (constructors, type names, etc.). Is this possible and how to do this? For example, I want to create MyList, and this module is the exact List module plus some functions of my own. Then, some of my code would use MyList instead of List. Thanks a lot, F. PS: a full copy-paste of list.ml is considered cheating ;)