unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Philip Munksgaard <philip@munksgaard.me>
Cc: 48943-done@debbugs.gnu.org
Subject: bug#48943: [PATCH] import: hackage: Support "common" field and imports
Date: Fri, 25 Jun 2021 14:27:35 +0200	[thread overview]
Message-ID: <87y2ay2kp4.fsf_-_@gnu.org> (raw)
In-Reply-To: <20210618124813.844948-1-philip@munksgaard.me> (Philip Munksgaard's message of "Fri, 18 Jun 2021 14:48:13 +0200")

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

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’.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 665 bytes --]

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)

      reply	other threads:[~2021-06-25 12:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-10  8:39 [bug#48943] [PATCH] import: hackage: Support "common" field and imports Philip Munksgaard
2021-06-13 20:34 ` Ludovic Courtès
2021-06-18 12:48 ` [bug#48943] [PATCH v2] " Philip Munksgaard
2021-06-25 12:27   ` Ludovic Courtès [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y2ay2kp4.fsf_-_@gnu.org \
    --to=ludo@gnu.org \
    --cc=48943-done@debbugs.gnu.org \
    --cc=philip@munksgaard.me \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).