unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#35558] [PATCH] gnu: add ocaml-odoc.
@ 2019-05-04 12:59 Gabriel Hondet
  2019-05-14 19:42 ` bug#35558: " Julien Lepiller
  0 siblings, 1 reply; 2+ messages in thread
From: Gabriel Hondet @ 2019-05-04 12:59 UTC (permalink / raw)
  To: 35558


[-- Attachment #1.1: Type: text/plain, Size: 84 bytes --]

Hi everyone,

Please find enclosed a sequence of patches to add ocaml-odoc

Gabriel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: ocaml-markup --]
[-- Type: text/x-diff, Size: 2653 bytes --]

From 5ba11eb3d3868ef92b6b2a37c6531963ec4ec6ab Mon Sep 17 00:00:00 2001
From: gabrielhdt <gabrielhondet@gmail.com>
Date: Sat, 4 May 2019 14:34:05 +0200
Subject: [PATCH 1/4] gnu: Add ocaml-markup.

* gnu/packages/ocaml.scm (ocaml-markup): New variable.
---
 gnu/packages/ocaml.scm | 42 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 6e69be3f19..82fd1cdd91 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -4960,3 +4960,45 @@ the full Core is not available, such as in Javascript.")
                license:asl2.0
                ;; MLton and sjs
                license:expat))))
+
+(define-public ocaml-markup
+  (package
+    (name "ocaml-markup")
+    (version "0.8.0")
+    (home-page "https://github.com/aantron/markup.ml")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url (string-append home-page ".git"))
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "0aif4abvfmi9xc1pvw5n5rbm6rzkkpsxyvdn0lanr33rjpvkwdlm"))))
+    (build-system dune-build-system)
+    (inputs
+     `(("ocaml-uchar" ,ocaml-uchar)
+       ("ocaml-uutf" ,ocaml-uutf)
+       ("ocaml-lwt" ,ocaml-lwt)))
+    (native-inputs `(("ocaml-ounit" ,ocaml-ounit)))
+    (synopsis "Error-recovering functional HTML5 and XML parsers and writers")
+    (description "Markup.ml provides an HTML parser and an XML parser.  The
+parsers are wrapped in a simple interface: they are functions that transform
+byte streams to parsing signal streams.  Streams can be manipulated in various
+ways, such as processing by fold, filter, and map, assembly into DOM tree
+structures, or serialization back to HTML or XML.
+
+Both parsers are based on their respective standards.  The HTML parser, in
+particular, is based on the state machines defined in HTML5.
+
+The parsers are error-recovering by default, and accept fragments.  This makes
+it very easy to get a best-effort parse of some input.  The parsers can,
+however, be easily configured to be strict, and to accept only full documents.
+
+Apart from this, the parsers are streaming (do not build up a document in
+memory), non-blocking (can be used with threading libraries), lazy (do not
+consume input unless the signal stream is being read), and process the input in
+a single pass. They automatically detect the character encoding of the input
+stream, and convert everything to UTF-8.")
+    (license license:bsd-3)))
-- 
2.21.0


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.3: ocaml-tyxml --]
[-- Type: text/x-diff, Size: 2360 bytes --]

From 8883d5dce989627527bedfe67d37db3719723710 Mon Sep 17 00:00:00 2001
From: gabrielhdt <gabrielhondet@gmail.com>
Date: Sat, 4 May 2019 14:47:13 +0200
Subject: [PATCH 2/4] gnu: Add ocaml-tyxml.

* gnu/packages/ocaml.scm (ocaml-tyxml): New variable.
---
 gnu/packages/ocaml.scm | 40 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 82fd1cdd91..3588836beb 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -5002,3 +5002,43 @@ consume input unless the signal stream is being read), and process the input in
 a single pass. They automatically detect the character encoding of the input
 stream, and convert everything to UTF-8.")
     (license license:bsd-3)))
+
+(define-public ocaml-tyxml
+  (package
+    (name "ocaml-tyxml")
+    (version "4.3.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/ocsigen/tyxml.git")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "0wv19xipkj8l2sks1h53105ywbjwk7q93fb7b8al4a2g9wr109c0"))))
+    (build-system dune-build-system)
+    (inputs
+     `(("ocaml-re" ,ocaml-re)
+       ("ocaml-seq" ,ocaml-seq)
+       ("ocaml-uutf" ,ocaml-uutf)
+       ("ocaml-ppx-tools-versioned" ,ocaml-ppx-tools-versioned)
+       ("ocaml-markup" ,ocaml-markup)))
+    (native-inputs
+     `(("ocaml-alcotest" ,ocaml-alcotest)))
+    (arguments `(#:jbuild? #t))
+    (home-page "https://github.com/ocsigen/tyxml/")
+    (synopsis "TyXML is a library for building correct HTML and SVG documents")
+    (description "TyXML provides a set of convenient combinators that uses the
+OCaml type system to ensure the validity of the generated documents.  TyXML can
+be used with any representation of HTML and SVG: the textual one, provided
+directly by this package, or DOM trees (@code{js_of_ocaml-tyxml}) virtual DOM
+(@code{virtual-dom}) and reactive or replicated trees (@code{eliom}).  You can
+also create your own representation and use it to instantiate a new set of
+combinators.
+
+@code{
+open Tyxml
+let to_ocaml = Html.(a ~a:[a_href \"ocaml.org\"] [txt \"OCaml!\"])
+}")
+    (license license:lgpl2.1)))
-- 
2.21.0


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.4: ocaml-bisect-ppx --]
[-- Type: text/x-diff, Size: 1949 bytes --]

From 06bce0893b0a6a1fb2ab09d01e4fbfd2d3a75dd5 Mon Sep 17 00:00:00 2001
From: gabrielhdt <gabrielhondet@gmail.com>
Date: Sat, 4 May 2019 14:48:38 +0200
Subject: [PATCH 3/4] gnu: Add ocaml-bisect-ppx.

* gnu/packages/ocaml.scm (ocaml-bisect-ppx): New variable.
---
 gnu/packages/ocaml.scm | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 3588836beb..787bbd855c 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -5042,3 +5042,33 @@ open Tyxml
 let to_ocaml = Html.(a ~a:[a_href \"ocaml.org\"] [txt \"OCaml!\"])
 }")
     (license license:lgpl2.1)))
+
+(define-public ocaml-bisect-ppx
+  (package
+    (name "ocaml-bisect-ppx")
+    (version "1.4.1")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/aantron/bisect_ppx.git")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "1vp3qvrkz7q25nbmvd40vhsnz2k9aqh17bnd21i3q8q0xlr5hdag"))))
+    (build-system dune-build-system)
+    (inputs
+     `(("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
+       ("ocaml-ppx-tools-versioned" ,ocaml-ppx-tools-versioned)
+       ("ocaml-ounit" ,ocaml-ounit)))
+    (home-page "https://github.com/aantron/bisect_ppx")
+    (synopsis "Code coverage for OCaml")
+    (description "Bisect_ppx helps you test thoroughly.  It is a small
+preprocessor that inserts instrumentation at places in your code, such as
+if-then-else and match expressions.  After you run tests, Bisect_ppx gives a
+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)))
-- 
2.21.0


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.5: ocaml-odoc --]
[-- Type: text/x-diff, Size: 2869 bytes --]

From 8cf63e00d15182fc674fa6e75b2949aa460f0cce Mon Sep 17 00:00:00 2001
From: gabrielhdt <gabrielhondet@gmail.com>
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


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* bug#35558: [PATCH] gnu: add ocaml-odoc.
  2019-05-04 12:59 [bug#35558] [PATCH] gnu: add ocaml-odoc Gabriel Hondet
@ 2019-05-14 19:42 ` Julien Lepiller
  0 siblings, 0 replies; 2+ messages in thread
From: Julien Lepiller @ 2019-05-14 19:42 UTC (permalink / raw)
  To: 35558-done

Le Sat, 04 May 2019 14:59:21 +0200,
Gabriel Hondet <gabrielhondet@gmail.com> a écrit :

> Hi everyone,
> 
> Please find enclosed a sequence of patches to add ocaml-odoc
> 
> Gabriel

Pushed as 38089b549fa1d54fcced3aaab96cc50ea980eb54 to
2f8e77bee26aa548e232a06cbec41f9bf31e533d.

Thank you and sorry for the delay!

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-05-14 19:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-04 12:59 [bug#35558] [PATCH] gnu: add ocaml-odoc Gabriel Hondet
2019-05-14 19:42 ` bug#35558: " Julien Lepiller

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).