all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#48867] [PATCH] gnu: Add guile-define.
@ 2021-06-06  9:55 Xinglu Chen
  2021-06-08 21:26 ` Ludovic Courtès
  0 siblings, 1 reply; 3+ messages in thread
From: Xinglu Chen @ 2021-06-06  9:55 UTC (permalink / raw)
  To: 48867

* gnu/packages/guile-xyz.scm (guile-define): New variable.
---
 gnu/packages/guile-xyz.scm | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index 6db5134344..6a84e5e052 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -1230,6 +1230,32 @@ using S-expressions.")
 tracker's SOAP service, such as @url{https://bugs.gnu.org}.")
     (license license:gpl3+)))
 
+(define-public guile-define
+  (let ((changeset "76881ea2bb68")
+        (revision "0"))
+    (package
+      (name "guile-define")
+      (version (hg-version "0.0.0" revision changeset))
+      (source
+       (origin
+         (method hg-fetch)
+         (uri (hg-reference
+               (url "https://hg.sr.ht/~bjoli/guile-define")
+               (changeset changeset)))
+         (file-name (hg-file-name name version))
+         (sha256
+          (base32 "1ns8p1j88x0ms8xalagz3qxjkzzvcg3dppz4balfcnr5pzy8zm4p"))))
+      (build-system guile-build-system)
+      (arguments
+       `(#:scheme-file-regexp "define\\.scm$"))
+      (native-inputs
+       `(("guile" ,guile-3.0)))
+      (home-page "https://hg.sr.ht/~bjoli/guile-define")
+      (synopsis "Definitions in expression contexts for Guile")
+      (description "This package provides a utility macro to allow
+@code{define}s in expression contexts of function bodies.")
+      (license license:isc))))
+
 (define-public guile-email
   (package
     (name "guile-email")

base-commit: 9caf7112ee50af26fbc4c1bd3c337f1f86b710af
-- 
2.31.1






^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [bug#48867] [PATCH] gnu: Add guile-define.
  2021-06-06  9:55 [bug#48867] [PATCH] gnu: Add guile-define Xinglu Chen
@ 2021-06-08 21:26 ` Ludovic Courtès
  2021-06-09 11:15   ` Xinglu Chen
  0 siblings, 1 reply; 3+ messages in thread
From: Ludovic Courtès @ 2021-06-08 21:26 UTC (permalink / raw)
  To: Xinglu Chen; +Cc: 48867

Hi,

Xinglu Chen <public@yoctocell.xyz> skribis:

> * gnu/packages/guile-xyz.scm (guile-define): New variable.

[...]

> +      (native-inputs
> +       `(("guile" ,guile-3.0)))
> +      (home-page "https://hg.sr.ht/~bjoli/guile-define")
> +      (synopsis "Definitions in expression contexts for Guile")
> +      (description "This package provides a utility macro to allow
> +@code{define}s in expression contexts of function bodies.")

This may have been useful with Guile 2.x but it’s useless with 3.0,
which already allows that:

--8<---------------cut here---------------start------------->8---
scheme@(guile-user)> (version)
$9 = "3.0.7"
scheme@(guile-user)> (define (divide-minus-one a b)
		       (when (= b 1) (error "We don't allow that here"))
		       (define b* (- b 1))
		       (/ a b*))
scheme@(guile-user)>
--8<---------------cut here---------------end--------------->8---

So either we make the package depend on 2.x, or we drop it.  Dropping it
is probably the best option if there are no dependents.

Thoughts?

Ludo’.




^ permalink raw reply	[flat|nested] 3+ messages in thread

* [bug#48867] [PATCH] gnu: Add guile-define.
  2021-06-08 21:26 ` Ludovic Courtès
@ 2021-06-09 11:15   ` Xinglu Chen
  0 siblings, 0 replies; 3+ messages in thread
From: Xinglu Chen @ 2021-06-09 11:15 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 48867

[-- Attachment #1: Type: text/plain, Size: 1240 bytes --]

On Tue, Jun 08 2021, Ludovic Courtès wrote:

> Hi,
>
> Xinglu Chen <public@yoctocell.xyz> skribis:
>
>> * gnu/packages/guile-xyz.scm (guile-define): New variable.
>
> [...]
>
>> +      (native-inputs
>> +       `(("guile" ,guile-3.0)))
>> +      (home-page "https://hg.sr.ht/~bjoli/guile-define")
>> +      (synopsis "Definitions in expression contexts for Guile")
>> +      (description "This package provides a utility macro to allow
>> +@code{define}s in expression contexts of function bodies.")
>
> This may have been useful with Guile 2.x but it’s useless with 3.0,
> which already allows that:
>
> --8<---------------cut here---------------start------------->8---
> scheme@(guile-user)> (version)
> $9 = "3.0.7"
> scheme@(guile-user)> (define (divide-minus-one a b)
> 		       (when (= b 1) (error "We don't allow that here"))
> 		       (define b* (- b 1))
> 		       (/ a b*))
> scheme@(guile-user)>
> --8<---------------cut here---------------end--------------->8---
>
> So either we make the package depend on 2.x, or we drop it.  Dropping it
> is probably the best option if there are no dependents.
>
> Thoughts?

Oh, I didn’t know that, then I think it’s fine to drop the package.


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 861 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-06-09 11:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-06  9:55 [bug#48867] [PATCH] gnu: Add guile-define Xinglu Chen
2021-06-08 21:26 ` Ludovic Courtès
2021-06-09 11:15   ` Xinglu Chen

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.