From patchwork Sat May 4 12:59:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gabriel Hondet X-Patchwork-Id: 13891 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 3773216F96; Sat, 4 May 2019 14:00:13 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id E75BD16F8D for ; Sat, 4 May 2019 14:00:09 +0100 (BST) Received: from localhost ([127.0.0.1]:56337 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hMuGv-0005qU-9Q for patchwork@mira.cbaines.net; Sat, 04 May 2019 09:00:09 -0400 Received: from eggs.gnu.org ([209.51.188.92]:34282) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hMuGr-0005pk-KK for guix-patches@gnu.org; Sat, 04 May 2019 09:00:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hMuGp-0007YC-Oj for guix-patches@gnu.org; Sat, 04 May 2019 09:00:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:37011) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hMuGp-0007Xw-Em for guix-patches@gnu.org; Sat, 04 May 2019 09:00:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hMuGp-0004kt-9W for guix-patches@gnu.org; Sat, 04 May 2019 09:00:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#35558] [PATCH] gnu: add ocaml-odoc. Resent-From: Gabriel Hondet Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 04 May 2019 13:00:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 35558 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 35558@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.155697479818232 (code B ref -1); Sat, 04 May 2019 13:00:03 +0000 Received: (at submit) by debbugs.gnu.org; 4 May 2019 12:59:58 +0000 Received: from localhost ([127.0.0.1]:50555 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMuGj-0004k0-HH for submit@debbugs.gnu.org; Sat, 04 May 2019 08:59:58 -0400 Received: from eggs.gnu.org ([209.51.188.92]:48062) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMuGg-0004jl-WF for submit@debbugs.gnu.org; Sat, 04 May 2019 08:59:56 -0400 Received: from lists.gnu.org ([209.51.188.17]:60660) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hMuGb-0007S5-OK for submit@debbugs.gnu.org; Sat, 04 May 2019 08:59:49 -0400 Received: from eggs.gnu.org ([209.51.188.92]:34174) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hMuGZ-0005oS-JM for guix-patches@gnu.org; Sat, 04 May 2019 08:59:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hMuGW-0007PP-PC for guix-patches@gnu.org; Sat, 04 May 2019 08:59:47 -0400 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]:38309) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hMuGH-0007Lz-3s for guix-patches@gnu.org; Sat, 04 May 2019 08:59:29 -0400 Received: by mail-wr1-x42d.google.com with SMTP id k16so11226059wrn.5 for ; Sat, 04 May 2019 05:59:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=user-agent:from:to:subject:date:message-id:mime-version; bh=2E8qSEfuU1s5+vvCLgB/ua664PKwcdoXv5kBgGwxVfM=; b=N82afrT7SPm4cAkD+xN8eaWedspSURUTzoIORHvGeqQdrrO0LeR/TXJEWhk7noZxJB JTmzeLhkQolVLuQND0v+Tl8rP3NFUobp05MfukxVRbfED/BmV/BVOUJwzClguEwCAljF UC9xGEFV27/tXnBZ494AvjTXxygEtjBZPEKT+RM+OE5wM9rH6lrJ8aipkVyUB6LVXzFT 7Bb+4WR9eQPApwzBRWMnknNSHIahcZtuuAZc+uPg6t0ibcq0LKGo3CjS4jA2yMML6mK6 8Y0/vbZy8CbNsVntHTAKI7ybGvxbcZOyUF0KB9vMdehFxsQ62CuLAaly2ON8V+Fmyleq cWVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:user-agent:from:to:subject:date:message-id :mime-version; bh=2E8qSEfuU1s5+vvCLgB/ua664PKwcdoXv5kBgGwxVfM=; b=qDSxZsvTrWKFJasmBPfOEJzhSbPN9I4NrFToXKhMHiVhlPyne9g2Mj/ZyaGH0yLXyJ dVM964H873bjewA5Qf59C8bwqXen2QT1zoCZpKT5ibuMoPNFZogkYTcwxSR8vhgbQaEH Fuz9AQpIXkSJ6r5lY5DhVxQ05BDxC65/n/7ZmBLBH4pSkpjY06uyqAp8z6zxh30Qjtdj 4XrmBCZFsQMAP0jtKfNuUZXX4265PaLBCoQlcsvRJtgcJZZEaDXX6zKrJiG5NUzmnvSO WtgxsjrxgIsG5EM0uJfyYE6B4B4rvhIeGKC7enfol0y4lbjgrKKVwb04Mu+Ad43NE4cf zlsQ== X-Gm-Message-State: APjAAAUJTCyyA9sKCD+tdYq0otVCOFCEvkhr3ZVDQ4p6U3F9SGOfrqS/ YrKViTI2lsoUOGuCaJewIaUCPxdI X-Google-Smtp-Source: APXvYqw9D1LgEtOF39JkvdZgdwqOMvUGSFy9u652WSMY/etkY1vxdaH5VbXXujUwBKV9NsC0lvGMxg== X-Received: by 2002:a5d:488d:: with SMTP id g13mr11031124wrq.119.1556974767737; Sat, 04 May 2019 05:59:27 -0700 (PDT) Received: from glht-aurore.gmail.com (2a01cb04062c860082fa5bfffe3823d7.ipv6.abo.wanadoo.fr. [2a01:cb04:62c:8600:82fa:5bff:fe38:23d7]) by smtp.gmail.com with ESMTPSA id j71sm4691150wmj.44.2019.05.04.05.59.26 for (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sat, 04 May 2019 05:59:26 -0700 (PDT) User-agent: mu4e 1.2.0; emacs 26.2 From: Gabriel Hondet Date: Sat, 04 May 2019 14:59:21 +0200 Message-ID: <87sgtuxtna.fsf@gmail.com> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Hi everyone, Please find enclosed a sequence of patches to add ocaml-odoc Gabriel From 8cf63e00d15182fc674fa6e75b2949aa460f0cce Mon Sep 17 00:00:00 2001 From: gabrielhdt Date: Sat, 4 May 2019 14:53:58 +0200 Subject: [PATCH 4/4] gnu: Add ocaml-odoc. * gnu/packages/ocaml.scm (ocaml-odoc): New variable. --- gnu/packages/ocaml.scm | 54 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm index 787bbd855c..6cb597e75f 100644 --- a/gnu/packages/ocaml.scm +++ b/gnu/packages/ocaml.scm @@ -5072,3 +5072,57 @@ nice HTML report showing which places were visited and which were missed. Usage is simple - add package bisect_ppx when building tests, run your tests, then run the Bisect_ppx report tool on the generated visitation files.") (license license:mpl2.0))) + +(define-public ocaml-odoc + (package + (name "ocaml-odoc") + (version "1.4.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/ocaml/odoc") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0br11cw6wa0mwafja4xdb45d2f8908l6nzdq5mw5lbfq2jnp68km")))) + (build-system dune-build-system) + (inputs + `(("ocaml-alcotest" ,ocaml-alcotest) + ("ocaml-markup" ,ocaml-markup) + ("ocaml-sexplib" ,ocaml-sexplib) + ("ocaml-re" ,ocaml-re) + ("ocaml-uutf" ,ocaml-uutf))) + (native-inputs + `(("ocaml-astring" ,ocaml-astring) + ("ocaml-cmdliner" ,ocaml-cmdliner) + ("ocaml-cppo" ,ocaml-cppo) + ("ocaml-fpath" ,ocaml-fpath) + ("ocaml-result" ,ocaml-result) + ("ocaml-tyxml" ,ocaml-tyxml) + ("ocaml-bisect-ppx" ,ocaml-bisect-ppx))) + (home-page "https://github.com/ocaml/odoc") + (synopsis "OCaml documentation generator") + (description "@emph{odoc} is a documentation generator for OCaml. It reads +@emph{doc comments}, delimited with @code{(** ... *)}, and outputs +@acronym{HTML}. + +Text inside doc comments is marked up in ocamldoc syntax: +@code{ +val compare : string -> string -> int +(** [compare s1 s2] compares [s1] and [s2] in {e lexicographic} order. The + result is negative if [s1] precedes [s2], positive if [s1] follows [s2], + and zero if [s1] and [s2] are equal. *) +} + +The syntax reference is +@uref{https://caml.inria.fr/pub/docs/manual-ocaml/ocamldoc.html#sec357, here}. +There is also an +@uref{https://caml.inria.fr/pub/docs/manual-ocaml/ocamldoc.html#sec352, +explanation} of how to attach comments to specific types, values, and other +elements in your program. + +odoc's main advantage over ocamldoc is an accurate cross-referencer, which +handles the complexity of the OCaml module system.") + (license license:isc))) -- 2.21.0