[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#48943: [PATCH] import: hackage: Support "common" field and imports
From: |
Ludovic Courtès |
Subject: |
bug#48943: [PATCH] import: hackage: Support "common" field and imports |
Date: |
Fri, 25 Jun 2021 14:27:35 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) |
Hi,
Philip Munksgaard <philip@munksgaard.me> skribis:
> Fixes <https://issues.guix.gnu.org/48701>.
>
> * guix/import/cabal.scm (make-cabal-parser): Modify.
> (is-common): New variable.
> (lex-common): New procedure.
> (is-id): Modify.
> (eval-cabal): Modify.
> * tests/hackage.scm ("hackage->guix-package test cabal import") New test.
Applied with the change below (‘cut’ is for procedures but ‘match’ is a
macro).
Thanks!
Ludo’.
diff --git a/guix/import/cabal.scm b/guix/import/cabal.scm
index 22b5d164d0..e9a0179b3d 100644
--- a/guix/import/cabal.scm
+++ b/guix/import/cabal.scm
@@ -809,10 +809,10 @@ the ordering operation and the version."
(if (eq? value 'false) #f #t)))
(define common-stanzas
- (filter-map (cut match <>
- (('section 'common common-name common)
- (cons common-name common))
- (_ #f))
+ (filter-map (match-lambda
+ (('section 'common common-name common)
+ (cons common-name common))
+ (_ #f))
cabal-sexp))
(define (eval sexp)