[PATCH] gnu: Add guile-define.

  • Done
  • quality assurance status badge
Details
2 participants
  • Ludovic Courtès
  • Xinglu Chen
Owner
unassigned
Submitted by
Xinglu Chen
Severity
normal
X
X
Xinglu Chen wrote on 6 Jun 2021 11:55
(address . guix-patches@gnu.org)
b1f9e67d6c0b16a07e4e90cbf49c463392d66390.1622973318.git.public@yoctocell.xyz
* gnu/packages/guile-xyz.scm (guile-define): New variable.
---
gnu/packages/guile-xyz.scm | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)

Toggle diff (41 lines)
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
L
L
Ludovic Courtès wrote on 8 Jun 2021 23:26
(name . Xinglu Chen)(address . public@yoctocell.xyz)(address . 48867@debbugs.gnu.org)
875yyodp4j.fsf@gnu.org
Hi,

Xinglu Chen <public@yoctocell.xyz> skribis:

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

[...]

Toggle quote (7 lines)
> + (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:

Toggle snippet (9 lines)
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)>

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’.
X
X
Xinglu Chen wrote on 9 Jun 2021 13:15
Re: [bug#48867] [PATCH] gnu: Add guile-define.
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 48867@debbugs.gnu.org)
87bl8fqof5.fsf@yoctocell.xyz
On Tue, Jun 08 2021, Ludovic Courtès wrote:

Toggle quote (33 lines)
> 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.
-----BEGIN PGP SIGNATURE-----

iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmDAot4VHHB1YmxpY0B5
b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x5eIUP/i9eojRaWG146fVPV63dtZsxlhtX
CAeIsIR/MBqoWOqk2Gchw7pAx/mzUt1bySrRo0qAaejLk3qyB+C+6TikshKQa3iu
IfzfHN1NJoi9P3LFEGSX8lW7PVMJUJmeqfudORJEQ+SaiOrtl1y+No8IhC84H2sV
52+PhFOxH883iXCZS4vib0P+AqbF8dkarhxBrZKtqvElI6QgQINcaJoKOS6OgZ62
d7EwmC75eNhGgkRPs2DozsJUjT3JCUxxCt2zrnilzL2cGIAn9lEnNunrklxsQ5NV
m2ItMrzWfZR/1pZNePj2GVqrm4icumKdCohh9T7CxHrwLbTCEoVmrHx6JdqYitut
qaQrcREbpeXFZwu8+Z6JoQanVf6bUCkZqClzLtTQUc9jd3TKUVlMcDy6od3CeozR
4FZIIpidvoiXfJcfEK5vCsv70rGmTLi7wyn/EYZtPwSOVqd23oypm1uBSM5DqhFw
e+LiJmJ6lCKV933rnRdqI+uaRewSytab//7nIRR+qkEAR4zdLkHu2N0v1o8wENz8
ptVVyvqyMT0aqdX6W6MdGxidDA0qrtaXrNznR3wNt9Bvk+84M4x0j8TDqNRRgWZH
lOFxioARqKLmyJ4Z7RomINCb2f0ne7BCcwB2EWQ4y1s8ZJEgOjOe3eX4yKlGRQEu
B8s8GF3zxcKtoNRp
=5Z/p
-----END PGP SIGNATURE-----

L
L
Ludovic Courtès wrote on 11 Jun 2021 18:33
control message for bug #48867
(address . control@debbugs.gnu.org)
87pmws5pjf.fsf@gnu.org
tags 48867 wontfix
close 48867
quit
?