GNU bug report logs - #45762
[PATCH] ocaml: Add ocaml-down and ocaml-ocp-index

Previous Next

Package: guix-patches;

Reported by: aecepoglu <aecepoglu <at> fastmail.fm>

Date: Sun, 10 Jan 2021 12:38:03 UTC

Severity: normal

Tags: patch

Done: Julien Lepiller <julien <at> lepiller.eu>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 45762 in the body.
You can then email your comments to 45762 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#45762; Package guix-patches. (Sun, 10 Jan 2021 12:38:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to aecepoglu <aecepoglu <at> fastmail.fm>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sun, 10 Jan 2021 12:38:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: aecepoglu <aecepoglu <at> fastmail.fm>
To: guix-patches <at> gnu.org
Subject: [PATCH] ocaml: Add ocaml-down and ocaml-ocp-index
Date: Sun, 10 Jan 2021 13:49:15 +0300
---
 gnu/packages/ocaml.scm | 132 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 132 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 2df16e7cd2..6699eb1050 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -390,6 +390,71 @@ repository-wide uninstallability checks.")
     ;; with static-linking exception
     (license license:lgpl2.1+)))
 
+(define-public ocaml-down
+  (package
+    (name "ocaml-down")
+    (version "0.0.3")
+    (source
+      (origin
+        (method url-fetch)
+        (uri "https://erratique.ch/software/down/releases/down-0.0.3.tbz")
+        (sha256
+          (base32
+            "1nz2f5j17frgr2vrslcz9klmi6w9sm2vqwwwpi33ngcm3rgmsrlg"))))
+    (build-system ocaml-build-system)
+    (arguments
+     `(#:tests? #f
+       #:phases (modify-phases %standard-phases
+                              (delete 'configure))
+       #:build-flags (list "build"
+                           "--lib-dir" (string-append (assoc-ref %outputs "out")
+                                                      "/lib/ocaml/site-lib"))))
+    (native-inputs
+      `(("ocaml-findlib" ,ocaml-findlib)
+        ("ocamlbuild" ,ocamlbuild)
+        ("ocaml-topkg" ,ocaml-topkg)
+        ("opam" ,opam)))
+    (home-page "https://erratique.ch/software/down")
+    (synopsis "An OCaml toplevel (REPL) upgrade")
+    (description
+      "
+Down is an unintrusive user experience upgrade for the `ocaml`
+toplevel (REPL). 
+
+Simply load the zero dependency `Down` library in the `ocaml` toplevel
+and you get line edition, history, session support and identifier
+completion and documentation (courtesy of [`ocp-index`][ocp-index]).
+
+Add this to your `~/.ocamlinit`:
+
+    #use \"down.top\"
+
+You may also need to add this to your `~/.ocamlinit` and declare
+the environment variable OCAML_TOPLEVEL_PATH
+
+    let () =
+      try Topdirs.dir_directory (Sys.getenv \"OCAML_TOPLEVEL_PATH\")
+      with Not_found -> ()
+
+OR
+     
+    let () = String.split_on_char ':' (Sys.getenv \"OCAMLPATH\")
+             |> List.filter (fun x -> Filename.check_suffix x \"/site-lib\")
+             |> List.map (fun x -> x ^ \"/toplevel\")
+             (* remove the line below if you don't want to see the text
+                every time you start the toplevel *)
+             |> List.map (fun x -> Printf.printf \"adding directory %s\\n\" x; x)
+             |> List.iter Topdirs.dir_directory;;
+
+
+![tty](doc/tty.png)
+
+Down is distributed under the ISC license.
+
+
+[ocp-index]: https://github.com/OCamlPro/ocp-index")
+    (license license:isc)))
+
 (define-public ocaml-opam-file-format
   (package
     (name "ocaml-opam-file-format")
@@ -2363,6 +2428,73 @@ the JSON data format.  It can process JSON text without blocking on IO and
 without a complete in-memory representation of the data.")
     (license license:isc)))
 
+(define-public ocaml-ocp-indent
+  (package
+    (name "ocaml-ocp-indent")
+    (version "1.8.1")
+    (source
+      (origin
+        (method url-fetch)
+        (uri "https://github.com/OCamlPro/ocp-indent/archive/1.8.1.tar.gz")
+        (sha256
+          (base32
+            "0rqcvwzpwwzwqvrzg1l37jjiglrk2ijgjg1c7vy3xvc8lk9zyysw"))))
+    (build-system dune-build-system)
+    (arguments
+     `(#:tests? #f
+       #:build-flags (list "--profile=release")))
+    (propagated-inputs
+      `(("ocaml-cmdliner" ,ocaml-cmdliner)))
+    (home-page
+      "http://www.typerex.org/ocp-indent.html")
+    (synopsis
+      "A simple tool to indent OCaml programs")
+    (description
+      "Ocp-indent is based on an approximate, tolerant OCaml parser and a simple stack
+machine ; this is much faster and more reliable than using regexps. Presets and
+configuration options available, with the possibility to set them project-wide.
+Supports most common syntax extensions, and extensible for others.
+
+Includes:
+- An indentor program, callable from the command-line or from within editors
+- Bindings for popular editors
+- A library that can be directly used by editor writers, or just for\n  fault-tolerant/approximate parsing.
+")
+    (license #f)))
+
+(define-public ocaml-ocp-index
+  (package
+    (name "ocaml-ocp-index")
+    (version "1.2.1")
+    (source
+      (origin
+        (method url-fetch)
+        (uri "https://github.com/OCamlPro/ocp-index/archive/1.2.1.tar.gz")
+        (sha256
+          (base32
+            "169msb3k1ip5lp79lr62nsk715rwrn53x9jcrnxz4js7c0fv0cyr"))))
+    (build-system dune-build-system)
+    (arguments
+     `(#:package "ocp-index"))
+    (propagated-inputs
+      `(("ocaml-ocp-indent" ,ocaml-ocp-indent)
+        ("ocaml-re" ,ocaml-re)
+        ("ocaml-cmdliner" ,ocaml-cmdliner)))
+    (native-inputs `(("ocaml-cppo" ,ocaml-cppo)))
+    (home-page
+      "http://www.typerex.org/ocp-index.html")
+    (synopsis
+      "Lightweight completion and documentation browsing for OCaml libraries")
+    (description
+      "This package includes
+* The `ocp-index` library and command-line tool
+* `ocp-grep`, a tool that finds uses of a given (qualified) identifier in a source tree
+* bindings for emacs and vim (sublime text also [available](https://github.com/whitequark/sublime-ocp-index/))
+
+To automatically configure your editors, install this with package `user-setup`.
+")
+    (license #f)))
+
 (define-public ocaml-ocurl
   (package
     (name "ocaml-ocurl")
-- 
2.29.2





Information forwarded to guix-patches <at> gnu.org:
bug#45762; Package guix-patches. (Mon, 11 Jan 2021 15:05:02 GMT) Full text and rfc822 format available.

Message #8 received at 45762 <at> debbugs.gnu.org (full text, mbox):

From: zimoun <zimon.toutoune <at> gmail.com>
To: aecepoglu <aecepoglu <at> fastmail.fm>, 45762 <at> debbugs.gnu.org
Subject: Re: [bug#45762] [PATCH] ocaml: Add ocaml-down and ocaml-ocp-index
Date: Mon, 11 Jan 2021 15:57:45 +0100
Hi,

Thanks for the patch.

On Sun, 10 Jan 2021 at 13:49, aecepoglu <aecepoglu <at> fastmail.fm> wrote:

> +(define-public ocaml-down
> +  (package

[...]

> +(define-public ocaml-ocp-indent
> +  (package

[...]

> +(define-public ocaml-ocp-index
> +  (package

Usually, it is one commit per package.  Could you spit this patch into 3
patches?


All the best,
simon




Information forwarded to guix-patches <at> gnu.org:
bug#45762; Package guix-patches. (Mon, 11 Jan 2021 15:16:02 GMT) Full text and rfc822 format available.

Message #11 received at 45762 <at> debbugs.gnu.org (full text, mbox):

From: Julien Lepiller <julien <at> lepiller.eu>
To: aecepoglu <aecepoglu <at> fastmail.fm>
Cc: 45762 <at> debbugs.gnu.org
Subject: Re: [bug#45762] [PATCH] ocaml: Add ocaml-down and ocaml-ocp-index
Date: Mon, 11 Jan 2021 16:15:14 +0100
Hi,

thanks for the patch!

Since it adds three packages, could you make this a series of three
patches, where each adds just one package? First, ocp-indent, then
ocp-index and finally down. Below are remarks that you should address in
these patches too :)

For each of them, the title of the patch should be "gnu: Add
<package-name>.", followed by a blank line and "*
gnu/packages/ocaml.scm (<package-name>): New variable.".

Le Sun, 10 Jan 2021 13:49:15 +0300,
aecepoglu <aecepoglu <at> fastmail.fm> a écrit :

> ---
>  gnu/packages/ocaml.scm | 132
> +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 132
> insertions(+)
> 
> diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
> index 2df16e7cd2..6699eb1050 100644
> --- a/gnu/packages/ocaml.scm
> +++ b/gnu/packages/ocaml.scm
> @@ -390,6 +390,71 @@ repository-wide uninstallability checks.")
>      ;; with static-linking exception
>      (license license:lgpl2.1+)))

In the first patch of the series, could you add a copyright line for
yourself? It's fine to use a pseudonym if you don't want to use your
legal name.

>  
> +(define-public ocaml-down
> +  (package
> +    (name "ocaml-down")
> +    (version "0.0.3")
> +    (source
> +      (origin
> +        (method url-fetch)
> +        (uri
> "https://erratique.ch/software/down/releases/down-0.0.3.tbz")
> +        (sha256
> +          (base32
> +
> "1nz2f5j17frgr2vrslcz9klmi6w9sm2vqwwwpi33ngcm3rgmsrlg"))))
> +    (build-system ocaml-build-system)
> +    (arguments
> +     `(#:tests? #f

Please add a comment explaining why you skip tests (could be "no tests"
if there is no tests) :)

> +       #:phases (modify-phases %standard-phases
> +                              (delete 'configure))
> +       #:build-flags (list "build"
> +                           "--lib-dir" (string-append (assoc-ref
> %outputs "out")
> +
> "/lib/ocaml/site-lib"))))

I think the indentation is off here, but I'll fix it, don't worry.

> +    (native-inputs
> +      `(("ocaml-findlib" ,ocaml-findlib)
> +        ("ocamlbuild" ,ocamlbuild)
> +        ("ocaml-topkg" ,ocaml-topkg)
> +        ("opam" ,opam)))

Same here, there's one space too much below native-inputs.

> +    (home-page "https://erratique.ch/software/down")
> +    (synopsis "An OCaml toplevel (REPL) upgrade")

Synpsis and description should not start with an article, so make
it "OCaml toplevel (REPL) upgrade" :)

> +    (description
> +      "
> +Down is an unintrusive user experience upgrade for the `ocaml`
> +toplevel (REPL). 
> +
> +Simply load the zero dependency `Down` library in the `ocaml`
> toplevel +and you get line edition, history, session support and
> identifier +completion and documentation (courtesy of
> [`ocp-index`][ocp-index]). +
> +Add this to your `~/.ocamlinit`:
> +
> +    #use \"down.top\"
> +
> +You may also need to add this to your `~/.ocamlinit` and declare
> +the environment variable OCAML_TOPLEVEL_PATH
> +
> +    let () =
> +      try Topdirs.dir_directory (Sys.getenv \"OCAML_TOPLEVEL_PATH\")
> +      with Not_found -> ()
> +
> +OR
> +     
> +    let () = String.split_on_char ':' (Sys.getenv \"OCAMLPATH\")
> +             |> List.filter (fun x -> Filename.check_suffix x
> \"/site-lib\")
> +             |> List.map (fun x -> x ^ \"/toplevel\")
> +             (* remove the line below if you don't want to see the
> text
> +                every time you start the toplevel *)
> +             |> List.map (fun x -> Printf.printf \"adding directory
> %s\\n\" x; x)
> +             |> List.iter Topdirs.dir_directory;;
> +
> +
> +![tty](doc/tty.png)
> +
> +Down is distributed under the ISC license.
> +
> +
> +[ocp-index]: https://github.com/OCamlPro/ocp-index")
> +    (license license:isc)))
> +

I supposed you used the description from the opam importer? It doesn't
use the same syntax as guix, so you have to translate them usually.
Don't worry too much though if you can't make it, I'll take care of it
when applying your patch :)

Basically, don't start with a new line, links are not supported, and
generally use texinfo syntax.

>  (define-public ocaml-opam-file-format
>    (package
>      (name "ocaml-opam-file-format")
> @@ -2363,6 +2428,73 @@ the JSON data format.  It can process JSON
> text without blocking on IO and without a complete in-memory
> representation of the data.") (license license:isc)))
>  
> +(define-public ocaml-ocp-indent
> +  (package
> +    (name "ocaml-ocp-indent")
> +    (version "1.8.1")
> +    (source
> +      (origin
> +        (method url-fetch)
> +        (uri
> "https://github.com/OCamlPro/ocp-indent/archive/1.8.1.tar.gz")
> +        (sha256
> +          (base32
> +
> "0rqcvwzpwwzwqvrzg1l37jjiglrk2ijgjg1c7vy3xvc8lk9zyysw"))))
> +    (build-system dune-build-system)
> +    (arguments
> +     `(#:tests? #f

Same question, why disable tests?

> +       #:build-flags (list "--profile=release")))

Unless there's a specific reason, I think #:package the usual way to do
it.

> +    (propagated-inputs
> +      `(("ocaml-cmdliner" ,ocaml-cmdliner)))
> +    (home-page
> +      "http://www.typerex.org/ocp-indent.html")
> +    (synopsis
> +      "A simple tool to indent OCaml programs")

Remove the article, so "Simple tool to indent OCaml programs"

> +    (description
> +      "Ocp-indent is based on an approximate, tolerant OCaml parser
> and a simple stack +machine ; this is much faster and more reliable
> than using regexps. Presets and +configuration options available,
> with the possibility to set them project-wide. +Supports most common
> syntax extensions, and extensible for others. +
> +Includes:
> +- An indentor program, callable from the command-line or from within
> editors +- Bindings for popular editors
> +- A library that can be directly used by editor writers, or just
> for\n  fault-tolerant/approximate parsing. +")

Sorry, my client is making a mess out of this. I'll make sure it looks
alright, don't worry about it.

> +    (license #f)))

Can you check the license and fill in the field please? #f is not
acceptable in Guix :)

> +
> +(define-public ocaml-ocp-index
> +  (package
> +    (name "ocaml-ocp-index")
> +    (version "1.2.1")
> +    (source
> +      (origin
> +        (method url-fetch)
> +        (uri
> "https://github.com/OCamlPro/ocp-index/archive/1.2.1.tar.gz")
> +        (sha256
> +          (base32
> +
> "169msb3k1ip5lp79lr62nsk715rwrn53x9jcrnxz4js7c0fv0cyr"))))
> +    (build-system dune-build-system)
> +    (arguments
> +     `(#:package "ocp-index"))
> +    (propagated-inputs
> +      `(("ocaml-ocp-indent" ,ocaml-ocp-indent)
> +        ("ocaml-re" ,ocaml-re)
> +        ("ocaml-cmdliner" ,ocaml-cmdliner)))
> +    (native-inputs `(("ocaml-cppo" ,ocaml-cppo)))
> +    (home-page
> +      "http://www.typerex.org/ocp-index.html")
> +    (synopsis
> +      "Lightweight completion and documentation browsing for OCaml
> libraries")
> +    (description
> +      "This package includes
> +* The `ocp-index` library and command-line tool
> +* `ocp-grep`, a tool that finds uses of a given (qualified)
> identifier in a source tree +* bindings for emacs and vim (sublime
> text also
> [available](https://github.com/whitequark/sublime-ocp-index/)) + +To
> automatically configure your editors, install this with package
> `user-setup`. +")

My client is again making a mess out of this, but I'll fix this anyway,
don't worry.

> +    (license #f)))

Same, please specify the license.

> +
>  (define-public ocaml-ocurl
>    (package
>      (name "ocaml-ocurl")

Overall great contribution! Thank you again!




Information forwarded to guix-patches <at> gnu.org:
bug#45762; Package guix-patches. (Mon, 11 Jan 2021 20:54:02 GMT) Full text and rfc822 format available.

Message #14 received at 45762 <at> debbugs.gnu.org (full text, mbox):

From: aecepoglu <aecepoglu <at> fastmail.fm>
To: 45762 <at> debbugs.gnu.org
Subject: [PATCH 1/3] ocaml: Add ocaml-ocp-indent * gnu/packages/ocaml.scm
 (ocaml-ocp-indent): New variable.
Date: Mon, 11 Jan 2021 23:55:04 +0300
---
 gnu/packages/ocaml.scm | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 2df16e7cd2..d2e2f03f3a 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -18,6 +18,7 @@
 ;;; Copyright © 2020 Simon Tournier <zimon.toutoune <at> gmail.com>
 ;;; Copyright © 2020 divoplade <d <at> divoplade.fr>
 ;;; Copyright © 2020 pukkamustard <pukkamustard <at> posteo.net>
+;;; Copyright © 2021 aecepoglu <aecepoglu <at> fastmail.fm>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -2363,6 +2364,42 @@ the JSON data format.  It can process JSON text without blocking on IO and
 without a complete in-memory representation of the data.")
     (license license:isc)))
 
+(define-public ocaml-ocp-indent
+  (package
+    (name "ocaml-ocp-indent")
+    (version "1.8.1")
+    (source
+      (origin
+        (method url-fetch)
+        (uri "https://github.com/OCamlPro/ocp-indent/archive/1.8.1.tar.gz")
+        (sha256
+          (base32
+            "0rqcvwzpwwzwqvrzg1l37jjiglrk2ijgjg1c7vy3xvc8lk9zyysw"))))
+    (build-system dune-build-system)
+    (arguments
+     `(#:tests? #f
+       #:build-flags (list "--profile=release")))
+    (propagated-inputs
+      `(("ocaml-cmdliner" ,ocaml-cmdliner)))
+    (home-page
+      "http://www.typerex.org/ocp-indent.html")
+    (synopsis
+      "Tool to indent OCaml programs")
+    (description
+      "Ocp-indent is based on an approximate, tolerant OCaml parser
+ and a simple stack machine.
+Presets and configuration options available,
+ with the possibility to set them project-wide.
+Supports most common syntax extensions, and extensible for others.
+
+Includes:
+
+- An indentor program, callable from the command-line or from within editors
+- Bindings for popular editors
+- A library that can be directly used by editor writers,
+  or just for fault-tolerant/approximate parsing.")
+    (license license:lgpl2.1)))
+
 (define-public ocaml-ocurl
   (package
     (name "ocaml-ocurl")
-- 
2.29.2





Information forwarded to guix-patches <at> gnu.org:
bug#45762; Package guix-patches. (Mon, 11 Jan 2021 20:54:02 GMT) Full text and rfc822 format available.

Message #17 received at 45762 <at> debbugs.gnu.org (full text, mbox):

From: aecepoglu <aecepoglu <at> fastmail.fm>
To: 45762 <at> debbugs.gnu.org
Subject: [PATCH 2/3] ocaml: Add ocaml-ocp-index * gnu/packages/ocaml.scm
 (ocaml-ocp-index): New variable.
Date: Mon, 11 Jan 2021 23:55:33 +0300
---
 gnu/packages/ocaml.scm | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index d2e2f03f3a..00978fa138 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2400,6 +2400,37 @@ Includes:
   or just for fault-tolerant/approximate parsing.")
     (license license:lgpl2.1)))
 
+(define-public ocaml-ocp-index
+  (package
+    (name "ocaml-ocp-index")
+    (version "1.2.1")
+    (source
+      (origin
+        (method url-fetch)
+        (uri "https://github.com/OCamlPro/ocp-index/archive/1.2.1.tar.gz")
+        (sha256
+          (base32
+            "169msb3k1ip5lp79lr62nsk715rwrn53x9jcrnxz4js7c0fv0cyr"))))
+    (build-system dune-build-system)
+    (arguments
+     `(#:package "ocp-index"))
+    (propagated-inputs
+     `(("ocaml-ocp-indent" ,ocaml-ocp-indent)
+       ("ocaml-re" ,ocaml-re)
+       ("ocaml-cmdliner" ,ocaml-cmdliner)))
+    (native-inputs
+     `(("ocaml-cppo" ,ocaml-cppo)))
+    (home-page
+      "http://www.typerex.org/ocp-index.html")
+    (synopsis
+      "Lightweight completion and documentation browsing for OCaml libraries")
+    (description
+      "This package includes only the `ocp-index` library
+and command-line tool.")
+    (license license:gpl3))) ; all files in libs/ are GNU lgpl2.1
+                             ; for static linking clause 6 of LGPL is lifted
+                             ; all other files under GNU gpl3
+
 (define-public ocaml-ocurl
   (package
     (name "ocaml-ocurl")
-- 
2.29.2





Information forwarded to guix-patches <at> gnu.org:
bug#45762; Package guix-patches. (Mon, 11 Jan 2021 20:55:01 GMT) Full text and rfc822 format available.

Message #20 received at 45762 <at> debbugs.gnu.org (full text, mbox):

From: aecepoglu <aecepoglu <at> fastmail.fm>
To: 45762 <at> debbugs.gnu.org
Subject: [PATCH 3/3] ocaml: Add ocaml-down * gnu/packages/ocaml.scm
 (ocaml-down): New variable.
Date: Mon, 11 Jan 2021 23:56:10 +0300
---
 gnu/packages/ocaml.scm | 56 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 56 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 00978fa138..300bfceadd 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -391,6 +391,62 @@ repository-wide uninstallability checks.")
     ;; with static-linking exception
     (license license:lgpl2.1+)))
 
+(define-public ocaml-down
+  (package
+    (name "ocaml-down")
+    (version "0.0.3")
+    (source
+      (origin
+        (method url-fetch)
+        (uri "https://erratique.ch/software/down/releases/down-0.0.3.tbz")
+        (sha256
+          (base32
+            "1nz2f5j17frgr2vrslcz9klmi6w9sm2vqwwwpi33ngcm3rgmsrlg"))))
+    (build-system ocaml-build-system)
+    (arguments
+     `(#:tests? #f ;no tests
+       #:phases (modify-phases %standard-phases
+                               (delete 'configure))
+       #:build-flags (list "build"
+                           "--lib-dir" (string-append (assoc-ref %outputs "out")
+                                                      "/lib/ocaml/site-lib"))))
+    (native-inputs
+     `(("ocaml-findlib" ,ocaml-findlib)
+       ("ocamlbuild" ,ocamlbuild)
+       ("ocaml-topkg" ,ocaml-topkg)
+       ("opam" ,opam)))
+    (home-page "https://erratique.ch/software/down")
+    (synopsis "OCaml toplevel (REPL) upgrade")
+    (description
+      "Down is an unintrusive user experience upgrade for the `ocaml`
+toplevel (REPL). 
+
+Simply load the zero dependency `down` library in the `ocaml` toplevel
+and you get line edition, history, session support and identifier
+completion and documentation `ocp-index`.
+
+Add this to your `~/.ocamlinit`:
+
+    #use \"down.top\"
+
+You may also need to add this to your `~/.ocamlinit` and declare
+the environment variable OCAML_TOPLEVEL_PATH
+
+    let () =
+      try Topdirs.dir_directory (Sys.getenv \"OCAML_TOPLEVEL_PATH\")
+      with Not_found -> ()
+
+OR
+
+    let () = String.split_on_char ':' (Sys.getenv \"OCAMLPATH\")
+             |> List.filter (fun x -> Filename.check_suffix x \"/site-lib\")
+             |> List.map (fun x -> x ^ \"/toplevel\")
+             (* remove the line below if you don't want to see the text
+                every time you start the toplevel *)
+             |> List.map (fun x -> Printf.printf \"adding directory %s\\n\" x; x)
+             |> List.iter Topdirs.dir_directory;;")
+    (license license:isc)))
+
 (define-public ocaml-opam-file-format
   (package
     (name "ocaml-opam-file-format")
-- 
2.29.2





Reply sent to Julien Lepiller <julien <at> lepiller.eu>:
You have taken responsibility. (Tue, 12 Jan 2021 14:11:02 GMT) Full text and rfc822 format available.

Notification sent to aecepoglu <aecepoglu <at> fastmail.fm>:
bug acknowledged by developer. (Tue, 12 Jan 2021 14:11:02 GMT) Full text and rfc822 format available.

Message #25 received at 45762-done <at> debbugs.gnu.org (full text, mbox):

From: Julien Lepiller <julien <at> lepiller.eu>
To: aecepoglu <aecepoglu <at> fastmail.fm>
Cc: 45762-done <at> debbugs.gnu.org
Subject: Re: [bug#45762] [PATCH] ocaml: Add ocaml-down and ocaml-ocp-index
Date: Tue, 12 Jan 2021 15:10:01 +0100
Pushed as b6529e189688ac8bc17c11cf24304fc554f5cb9b to
e3b71ee6dcb87452192fb4f5df9eeea31f1c1cfd. Thank you!

I changed the first two packages to use the git checkout instead of the
generated archive by github, because this archive is unstable:
sometimes it gets regenerated and has a different hash. git commits
don't do that.

I also updated ocp-indent to the latest version, and managed to get the
tests to run with the #:test-target argument. I also fixed the home
page (http -> https).

For the rest, I fixed the description by replacing markdown with
texinfo decoration `...` -> @code, @file, @command, ...

Thanks again for your contribution! If you run "guix pull" you should
be able to install ocaml-down :)

Lastly, if you use the git:send-email package, you should be able to
use the git send-email command, which should make sure to properly send
the patch description outside of the subject. Also, make sure to run
"guix lint" on the packages you submit next time, as it sometimes have
good suggestions to help improve the quality of your packages :)




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 10 Feb 2021 12:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 47 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.