diff mbox series

bug#48943: [PATCH] import: hackage: Support "common" field and imports

Message ID 87y2ay2kp4.fsf_-_@gnu.org
State Accepted
Headers show
Series bug#48943: [PATCH] import: hackage: Support "common" field and imports | expand

Checks

Context Check Description
cbaines/applying patch fail View Laminar job

Commit Message

Ludovic Courtès June 25, 2021, 12:27 p.m. UTC
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 mbox series

Patch

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)