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 mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id D41A17FB2F for ; Sat, 6 Dec 2014 14:06:47 +0100 (CET) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of asai@is.ocha.ac.jp) identity=pra; client-ip=133.65.64.10; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="asai@is.ocha.ac.jp"; x-sender="asai@is.ocha.ac.jp"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of asai@is.ocha.ac.jp designates 133.65.64.10 as permitted sender) identity=mailfrom; client-ip=133.65.64.10; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="asai@is.ocha.ac.jp"; x-sender="asai@is.ocha.ac.jp"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@web.is.ocha.ac.jp) identity=helo; client-ip=133.65.64.10; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="asai@is.ocha.ac.jp"; x-sender="postmaster@web.is.ocha.ac.jp"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApgAAMr+glSFQUAKl2dsb2JhbABZg1hYxlKHLxYBAQEBAREBAQEBAQgWB0KEG2FCNAUgAQUBV4gYAQWvA4MlPTGcPoUsDCAKkGKDC4EVBYovgy2DWYE1WoYaAYEiNI4HgXQ3hTVggkMBAQE X-IPAS-Result: ApgAAMr+glSFQUAKl2dsb2JhbABZg1hYxlKHLxYBAQEBAREBAQEBAQgWB0KEG2FCNAUgAQUBV4gYAQWvA4MlPTGcPoUsDCAKkGKDC4EVBYovgy2DWYE1WoYaAYEiNI4HgXQ3hTVggkMBAQE X-IronPort-AV: E=Sophos;i="5.07,529,1413237600"; d="ml'?scan'208";a="92223543" Received: from web.is.ocha.ac.jp ([133.65.64.10]) by mail3-smtp-sop.national.inria.fr with ESMTP; 06 Dec 2014 14:06:45 +0100 Received: from mail-pd0-f173.google.com (mail-pd0-f173.google.com [209.85.192.173]) by web.is.ocha.ac.jp (Postfix) with ESMTP id 0015E996855 for ; Sat, 6 Dec 2014 22:06:21 +0900 (JST) Received: by mail-pd0-f173.google.com with SMTP id ft15so2383337pdb.4 for ; Sat, 06 Dec 2014 05:06:40 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-type:content-disposition:user-agent; bh=WH3SQMIlLvLBcUHsqDzlsvclwoAklsmB9G7qe4Ez9RM=; b=LP2zeLyIUDRHTIw4A3wee13bidZw83DGxCR2fEzzFLUuj9pqenL68w6i24/OYZqGQF pjSxfbOCVMAGbfRra+L4XiKMBJWJEgpzh0j3q4N+Kb5BZcUu44Co8Yh5QhckZh02P7jm WroKVr2i27di4QWdzp6haKgFFqNrkNDjRKnNP4LZIIqpIQ8LJNjyNwFpwyNJ7jNl1/jp Sv7azQQhAqu1pUZLpGyhCzoYFGMoPzSxO5cl43NhQhZbJm+bVPuJE516GzEVneqYJ6yE ZCHL0l0rr1hf+y7dGB4qiSxsLUyBwXGBOy3ybzQXWMRyh4TjphiDTUmnL+mcctoETGUr IjuQ== X-Gm-Message-State: ALoCoQlI5drZVvGva7y3DGEiuZp7DTowAvUWTreybxcp+Xt2ctsgHiFTMyO8e4/SW7uPwp91Xqpt2icllbMDhlHWnnQswejvocrm2uypLFIyCzm1P4q127N/zw0+3babaHmqgoRxYxWY X-Received: by 10.70.118.1 with SMTP id ki1mr4352638pdb.69.1417871200833; Sat, 06 Dec 2014 05:06:40 -0800 (PST) X-Received: by 10.70.118.1 with SMTP id ki1mr4352628pdb.69.1417871200721; Sat, 06 Dec 2014 05:06:40 -0800 (PST) Received: from localhost (cb8ae2-238.dynamic.tiki.ne.jp. [203.138.226.238]) by mx.google.com with ESMTPSA id b11sm5516200pdl.56.2014.12.06.05.06.38 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sat, 06 Dec 2014 05:06:39 -0800 (PST) Date: Sat, 6 Dec 2014 22:06:33 +0900 From: Kenichi Asai To: caml-list@inria.fr Message-ID: <20141206130633.GA56657@pllab.is.ocha.ac.jp> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="x+6KMIRAuhnl3hBn" Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) Subject: [Caml-list] Can I pass added command line option through ocamlfind? --x+6KMIRAuhnl3hBn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Following Francois Ripault's comment, I am studying OCamlDoc's custom tags. (Thank you Francois!) I implemented the attached custom generator implementing @en and @ja tags together with a new command line option "-lang". Now, what I want to do is: ocamlfind ocamldoc -package lablgtk2.gnomecanvas -g custom.cmxs -d html -lang ja file.ml ... However, since ocamlfind does not recognize -lang as a proper option for ocamldoc, I get: ocamldoc: unknown option `-lang'. Is there any way to tell ocamlfind to pass the '-lang ja' option as is to ocamldoc? Alternatively, how do I specify the equivalent of '-package lablgtk2.gnomecanvas' without using ocamlfind? I tried: ocamldoc -I lablgtk2.gnomecanvas -g custom.cmxs -d html -lang ja file.ml ... ocamldoc -I +lablgtk2.gnomecanvas -g custom.cmxs -d html -lang ja file.ml ... ocamldoc -I +lablgtk2 -g custom.cmxs -d html -lang ja file.ml ... etc., but they all produced: Error: Unbound class GnoCanvas.group Thank you in advance. Sincerely, -- Kenichi Asai --x+6KMIRAuhnl3hBn Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="custom.ml" (** language tag: "en" for English, "ja" for Japanese *) let lang = ref "en" module Generator (G : Odoc_html.Html_generator) = struct class html = object(self) inherit G.html (** copied from argot: http://argot.x9c.fr *) method private string_of_text text = let buff = Buffer.create 256 in self#html_of_text buff text; Buffer.contents buff (** Return HTML code for the given text of a lang tag. *) method private html_of_lang text = (* your code here *) self#string_of_text text initializer tag_functions <- (!lang, self#html_of_lang) :: tag_functions (** register only !lang. Other tags are ignored *) end end let _ = begin Odoc_args.add_option ("-lang", Arg.Set_string lang, "[en|ja]\n\t\tGenerate English document"); Odoc_args.extend_html_generator (module Generator : Odoc_gen.Html_functor) end --x+6KMIRAuhnl3hBn--