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 mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by sympa.inria.fr (Postfix) with ESMTPS id 0955C7EDC2 for ; Wed, 21 Nov 2012 04:34:54 +0100 (CET) Received-SPF: None (mail1-smtp-roc.national.inria.fr: no sender authenticity information available from domain of wojciech.meyer@googlemail.com) identity=pra; client-ip=74.125.82.182; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="wojciech.meyer@googlemail.com"; x-sender="wojciech.meyer@googlemail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail1-smtp-roc.national.inria.fr: domain of wojciech.meyer@googlemail.com designates 74.125.82.182 as permitted sender) identity=mailfrom; client-ip=74.125.82.182; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="wojciech.meyer@googlemail.com"; x-sender="wojciech.meyer@googlemail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail1-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-we0-f182.google.com) identity=helo; client-ip=74.125.82.182; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="wojciech.meyer@googlemail.com"; x-sender="postmaster@mail-we0-f182.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0BAPtKrFBKfVK2kGdsb2JhbABEhVm8dQgWDgEBAQEJCQ0HFAQjgh4BAQQBJxkBOAEDAQsGBQsWJQ8BBCABBQEiE4d6AQMJBgSgRI8pgQeEBApADYlOAQUMkQoDlX6BHI1FP4QDDQ X-IronPort-AV: E=Sophos;i="4.83,290,1352070000"; d="scan'208";a="182435106" Received: from mail-we0-f182.google.com ([74.125.82.182]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 21 Nov 2012 04:34:53 +0100 Received: by mail-we0-f182.google.com with SMTP id u54so2486490wey.27 for ; Tue, 20 Nov 2012 19:34:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=M0pA3SOdXlzfuhPk1eeT355kvlXL3bL9GIf4IFMeGEM=; b=VZxH6NldPa3+Y/AjMoxawE695/wZwymRL607whBQ3/6bkYsSjLZdANjuQcvGba8YMO a33ZPlXatRhYlT45uuYXrOfXLSwgxVu/4ZkBm0HmCwyTRfiIEZ7usWdVcYnucIH61BDz Kz26Qt4s94U0a7Qsf1W/aRf0ReTXjIehFh2gV5iurLjltpzyT6A9aZdyOAgGoi6pTNS7 +aHYbkSjnkeR6Mhs5I/+7mePddyix9UFQFJNLrS7Msl4QReigmLpko4qKVSDDpaAzjXE VQ1++IEQsJcF2ryige4NezcPiQe5q8ws00cK3qkYx26LL4LJOAxy2DFuz0dgCigh+lrn OsUA== Received: by 10.180.88.72 with SMTP id be8mr622682wib.19.1353468893322; Tue, 20 Nov 2012 19:34:53 -0800 (PST) Received: from spec-desktop.danmey.org (cpc1-cmbg12-0-0-cust201.5-4.cable.virginmedia.com. [86.9.116.202]) by mx.google.com with ESMTPS id r10sm22810047wiz.0.2012.11.20.19.34.51 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 20 Nov 2012 19:34:52 -0800 (PST) From: Wojciech Meyer To: Francois Berenger Cc: caml-list@inria.fr References: <50AC44E6.1070702@riken.jp> Date: Wed, 21 Nov 2012 03:34:56 +0000 In-Reply-To: <50AC44E6.1070702@riken.jp> (Francois Berenger's message of "Wed, 21 Nov 2012 12:05:10 +0900") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.94 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Caml-list] How to add a hook to Stream.junk? Francois Berenger writes: > Why the need for module type of and all? > > Why not simply: > > module MyStream = struct > include Stream > let junk = > failwith "put your code here" > end;; Yes you could also do through a functor application. module MyStream(H : sig val junk_hook : unit -> unit end) = struct include Stream let junk stream = H.junk_hook (); junk stream end -- Wojciech Meyer http://danmey.org