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.7 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 B6536BBAF for ; Sun, 8 Mar 2009 16:39:08 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgADAH2Ds0nRVduukWdsb2JhbACUaz8BAQEBCQkMBw+uEIEHjiABAwEDhAIGgxM X-IronPort-AV: E=Sophos;i="4.38,325,1233529200"; d="scan'208";a="25243138" Received: from mail-ew0-f174.google.com ([209.85.219.174]) by mail1-smtp-roc.national.inria.fr with ESMTP; 08 Mar 2009 16:39:08 +0100 Received: by ewy22 with SMTP id 22so788779ewy.27 for ; Sun, 08 Mar 2009 08:39:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:references:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:mime-version :subject:date:cc:x-mailer; bh=GMvyzh2jPGLGvkwz5i4RMTbn0CKwLJ9QIAY3Iveuvw4=; b=c/962ID7WUbaBUKnIV5NSeJBnVTC/YEv1u7N081NPp1KvnR1mJDOnSSgkHVAOQ+FPO 8IY1lUpXT4foojTpvSc68vv1LqhxRZDq/T9hm0Zl54r56yWrSfNTnlp3vKKdlueX/V9O nhlQwgLal4C0k4AQwLf1BHSk23NAKiOsUl2sU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=references:message-id:from:to:in-reply-to:content-type :content-transfer-encoding:mime-version:subject:date:cc:x-mailer; b=SuWH0hKT6HA6PpRsWvsV9hwY7BhFk3JRDkQFtorwBjxonN/6zMM6+RI0wXXzucI9pQ b71mjZkIdXymjxWLcd8c7Zc0qW5RCboc+HOA+DJGBjngZxo0FDj5yPYpnlL7oQMpAR4l 1OQNDFlutm5KNtcEibqMdL4S+HjqbMSfXDnfs= Received: by 10.210.42.13 with SMTP id p13mr1697646ebp.85.1236526748338; Sun, 08 Mar 2009 08:39:08 -0700 (PDT) Received: from ?10.10.30.5? (94.Red-88-6-143.staticIP.rima-tde.net [88.6.143.94]) by mx.google.com with ESMTPS id i3sm6020620nfh.33.2009.03.08.08.39.07 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 08 Mar 2009 08:39:08 -0700 (PDT) References: <24D11586-4F15-4B6E-8FB7-58651317164D@gmail.com> <46331.52510.qm@web27007.mail.ukl.yahoo.com> <0B508092-FD71-4733-BC95-B6B87A6D3E6B@gmail.com> <154139.25342.qm@web27007.mail.ukl.yahoo.com> <46FCBABD-7E4A-4077-8227-3816FD6D635D@gmail.com> <279881.54090.qm@web27008.mail.ukl.yahoo.com> <58D957FE-F549-4B2F-9794-6A6651A20A29@gmail.com> <843379.3763.qm@web27007.mail.ukl.yahoo.com> <801023.45786.qm@web27008.mail.ukl.yahoo.com> <2368FDC0-FD1F-49B8-BDE0-53C2D641070B@gmail.com> <149632.77706.qm@web27001.mail.ukl.yahoo.com> <2F6DE824-09BE-4CB2-8AEA-3CAC58203A43@gmail.com> <537901.83501.qm@web27007.mail.ukl.yahoo.com> Message-Id: <48865E53-5C92-4007-8BAC-8A24C9774526@gmail.com> From: Joel Reymont To: Matthieu Wipliez In-Reply-To: <537901.83501.qm@web27007.mail.ukl.yahoo.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v930.3) Subject: [Caml-list] Re: camlp4 stream parser syntax Date: Sun, 8 Mar 2009 15:39:05 +0000 Cc: O'Caml Mailing List X-Mailer: Apple Mail (2.930.3) X-Spam: no; 0.00; camlp:01 parser:01 syntax:01 matthieu:01 lexer:01 sig:01 lexer:01 sig:01 struct:01 ocaml:01 cleanest:98 'get:98 token:01 token:01 wrote:01 On Mar 8, 2009, at 3:32 PM, Matthieu Wipliez wrote: > I'd say duplicate Static, and redefine "using". Seems like the > simplest solution to me, certainly not the cleanest though (but is > there an alternative?). Now we are talking! This is Static.ml: module Make (Lexer : Sig.Lexer) : Sig.Grammar.Static with module Loc = Lexer.Loc and module Token = Lexer.Token = struct module Structure = Structure.Make Lexer; module Delete = Delete.Make Structure; module Insert = Insert.Make Structure; module Fold = Fold.Make Structure; include Structure; ... value get_filter () = gram.gfilter; ... value extend = Insert.extend; end; I read the documentation for 'include' but couldn't quite grasp whether the included interface was exported from that module that's including. Given that 'get_filter' is available but 'using', I reckon the answer is NO. What if Static1 included Static after making it, then included Structure again and defined its own using in terms of the one provided by Structure? --- http://tinyco.de Mac, C++, OCaml