diff mbox series

[bug#64209,11/14] gnu: Add ocaml-pp.

Message ID c306259b55a2a1acb626382555d6fcb60a1db2ad.1687361650.git.benjamin@uvy.fr
State New
Headers show
Series Add ocaml-lsp-server and its dependencies | expand

Commit Message

Benjamin June 21, 2023, 3:48 p.m. UTC
* gnu/packages/ocaml.scm (ocaml-pp): New variable.
---
 gnu/packages/ocaml.scm | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)
diff mbox series

Patch

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 30eb7e2209..ffc7a9e5e9 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2015,6 +2015,37 @@  (define-public ocaml5.0-csexp
     (propagated-inputs
      `(("ocaml-result" ,ocaml5.0-result)))))
 
+(define-public ocaml-pp
+  (package
+    (name "ocaml-pp")
+    (version "1.1.2")
+    (home-page "https://github.com/ocaml-dune/pp")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                     (url home-page)
+                     (commit version)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0w7gxa85ffbd6jgs6ziarq69yi423f0qkpk05r3abh6lg8smw8pg"))))
+    (build-system dune-build-system)
+    (native-inputs (list ocaml-ppx-expect))
+    (synopsis "Pretty-printing library")
+    (description
+     "This library provides a lean alternative to the Format [1] module of the OCaml
+standard library.  It aims to make it easy for users to do the right thing.  If
+you have tried Format before but find its API complicated and difficult to use,
+then Pp might be a good choice for you.  Pp uses the same concepts of boxes and
+break hints, and the final rendering is done to formatter from the Format
+module.  However it defines its own algebra which some might find easier to work
+with and reason about.  No previous knowledge is required to start using this
+library, however the various guides for the Format module such as this one [2]
+should be applicable to Pp as well. [1]:
+https://caml.inria.fr/pub/docs/manual-ocaml/libref/Format.html [2]:
+http://caml.inria.fr/resources/doc/guides/format.en.html")
+    (license license:expat)))
+
 (define-public ocaml-migrate-parsetree
   (package
     (name "ocaml-migrate-parsetree")