summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Lepiller <julien@lepiller.eu>2022-04-30 15:55:00 +0200
committerJulien Lepiller <julien@lepiller.eu>2022-04-30 17:59:41 +0200
commitfbcd25f5ef2f3d51dae30d0f8085d6a57c4944a7 (patch)
treeef29f7d95d150abdf5b7ca0e4f38c29adab1867e
parent0a64b629ae8512790d532158a72a4a25698e8157 (diff)
gnu: Add ocaml-camlp-streams.
* gnu/packages/ocaml.scm (ocaml-camlp-streams): New variable.
-rw-r--r--gnu/packages/ocaml.scm43
1 files changed, 43 insertions, 0 deletions
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 2cfe94106d..64eb5261a9 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -899,6 +899,49 @@ Git-friendly development workflow.")
;; The 'LICENSE' file waives some requirements compared to LGPLv3.
(license license:lgpl3)))
+(define-public ocaml-camlp-streams
+ (package
+ (name "ocaml-camlp-streams")
+ (version "5.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/ocaml/camlp-streams")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1wd5k0irzwi841b27pbx0n5fdybbgx97184zm8cjajizd2j8w0g5"))))
+ (build-system dune-build-system)
+ (arguments
+ ;; No tests
+ `(#:tests? #f))
+ (home-page "https://github.com/ocaml/camlp-streams")
+ (synopsis "Stream and Genlex libraries for use with Camlp4 and Camlp5")
+ (description
+ "This package provides two library modules:
+
+@itemize
+@item Stream: imperative streams, with in-place update and memoization of
+the latest element produced.
+@item Genlex: a small parameterized lexical analyzer producing streams of
+tokens from streams of characters.
+@end itemize
+
+The two modules are designed for use with Camlp4 and Camlp5: The stream
+patterns and stream expressions of Camlp4/Camlp5 consume and produce data of
+type 'a Stream.t. The Genlex tokenizer can be used as a simple lexical
+analyzer for Camlp4/Camlp5-generated parsers.
+
+The Stream module can also be used by hand-written recursive-descent parsers,
+but is not very convenient for this purpose.
+
+The Stream and Genlex modules have been part of the OCaml standard library for a
+long time, and have been distributed as part of the core OCaml system. They
+will be removed from the OCaml standard library at some future point, but will
+be maintained and distributed separately in the camlpstreams package.")
+ (license license:lgpl2.1)))
+
(define-public camlp5
(package
(name "camlp5")