diff options
author | gabrielhdt <gabrielhondet@gmail.com> | 2019-05-04 14:34:05 +0200 |
---|---|---|
committer | Julien Lepiller <julien@lepiller.eu> | 2019-05-14 21:33:48 +0200 |
commit | 38089b549fa1d54fcced3aaab96cc50ea980eb54 (patch) | |
tree | 81b2ccd55c539d3713b8657b23697fd7aec2050d /gnu/packages/ocaml.scm | |
parent | 6b4a6c201a935a2df8e473465662b2bb75491bfb (diff) | |
download | patches-38089b549fa1d54fcced3aaab96cc50ea980eb54.tar patches-38089b549fa1d54fcced3aaab96cc50ea980eb54.tar.gz |
gnu: Add ocaml-markup.
* gnu/packages/ocaml.scm (ocaml-markup): New variable.
Signed-off-by: Julien Lepiller <julien@lepiller.eu>
Diffstat (limited to 'gnu/packages/ocaml.scm')
-rw-r--r-- | gnu/packages/ocaml.scm | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm index d4df52edc6..c810c9d14d 100644 --- a/gnu/packages/ocaml.scm +++ b/gnu/packages/ocaml.scm @@ -4966,3 +4966,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))) |