GNU bug report logs -
#61420
[PATCH 00/31] Haskell upgrade to Stackage 20.5
Previous Next
Reported by: Lars-Dominik Braun <lars <at> 6xq.net>
Date: Sat, 11 Feb 2023 10:00:02 UTC
Severity: normal
Tags: patch
Done: Lars-Dominik Braun <lars <at> 6xq.net>
Bug is archived. No further changes may be made.
Full log
Message #107 received at 61420 <at> debbugs.gnu.org (full text, mbox):
Hi,
On Sat, 11 Feb 2023 at 11:08, Lars-Dominik Braun <lars <at> 6xq.net> wrote:
> * guix/import/hackage.scm (guix-package->hackage-name): Removed.
> (latest-release): Use package-upstream-name* instead.
> * guix/import/stackage.scm (latest-lts-release): Ditto.
> (stackage-lts-package?): Ditto.
> -(define guix-package->hackage-name
> - (let ((uri-rx (make-regexp "(https?://hackage.haskell.org|mirror://hackage)/package/([^/]+)/.*"))
> - (name-rx (make-regexp "(.*)-[0-9\\.]+")))
> - (lambda (package)
> - "Given a Guix package name, return the corresponding Hackage name."
> - (let* ((source-url (and=> (package-source package) origin-uri))
> - (name (match:substring (regexp-exec uri-rx source-url) 2)))
> - (match (regexp-exec name-rx name)
> - (#f name)
> - (m (match:substring m 1)))))))
Why not just do a drop-in replacement of the implement of
’guix-package->hackage-name’ by the implementation of
’package-upstream-name*’?
Other said, avoid to introduce a new procedure and remove another; and
instead just replace the implementation of the old by the new.
> - (let* ((hackage-name (guix-package->hackage-name package))
> + (let* ((hackage-name (package-upstream-name* package))
It would avoid all these kind of replacement, no?
Cheers,
simon
This bug report was last modified 2 years and 171 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.