aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/ocaml.scm
diff options
context:
space:
mode:
authorJulien Lepiller <julien@lepiller.eu>2019-02-01 16:39:59 +0100
committerJulien Lepiller <julien@lepiller.eu>2019-02-05 22:33:17 +0100
commitc16c8bb68d389edcc7b866a8e91abba0e0204241 (patch)
tree9802208a2af46cfa1f6a051c6feb6caf5ffd7177 /gnu/packages/ocaml.scm
parent7e12b4c2bbccff460724be62477a8b57889dfd25 (diff)
downloadguix-c16c8bb68d389edcc7b866a8e91abba0e0204241.tar
guix-c16c8bb68d389edcc7b866a8e91abba0e0204241.tar.gz
gnu: Add ocaml-ppx-compare.
* gnu/packages/ocaml.scm (ocaml-ppx-compare): New variable.
Diffstat (limited to 'gnu/packages/ocaml.scm')
-rw-r--r--gnu/packages/ocaml.scm29
1 files changed, 29 insertions, 0 deletions
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 7e57752d43..b65c633a28 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -5164,3 +5164,32 @@ OCaml AST in the OCaml syntax;
@item a generator of open recursion classes from type definitions.
@end itemize")
(license license:expat)))
+
+(define-public ocaml-ppx-compare
+ (package
+ (name "ocaml-ppx-compare")
+ (version "0.11.1")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/janestreet/ppx_compare.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "06bq4m1bsm4jlx4g7wh5m99qky7xm4c2g52kaz6pv25hdn5agi2m"))))
+ (build-system dune-build-system)
+ (propagated-inputs
+ `(("ocaml-base" ,ocaml-base)
+ ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
+ ("ocaml-ppxlib" ,ocaml-ppxlib)))
+ (properties `((upstream-name . "ppx_compare")))
+ (home-page "https://github.com/janestreet/ppx_compare")
+ (synopsis "Generation of comparison functions from types")
+ (description "Generation of fast comparison functions from type expressions
+and definitions. Ppx_compare is a ppx rewriter that derives comparison functions
+from type representations. The scaffolded functions are usually much faster
+than ocaml's Pervasives.compare. Scaffolding functions also gives you more
+flexibility by allowing you to override them for a specific type and more safety
+by making sure that you only compare comparable values.")
+ (license license:asl2.0)))