[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH]: Rewrite CRAN importer.

From: Ludovic Courtès
Subject: Re: [PATCH]: Rewrite CRAN importer.
Date: Fri, 11 Dec 2015 10:47:35 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Ricardo Wurmus <address@hidden> skribis:

> Ludovic Courtès <address@hidden> writes:
>>> +(define (safe-car maybe-pair)
>> Does it have airbags?
> Rounded corners, no explosive combustion engine, and wrapped in an extra
> thick layer of fluff!


> From 7f90add2b33707178964364c86f8a4440e6bf554 Mon Sep 17 00:00:00 2001
> From: Ricardo Wurmus <address@hidden>
> Date: Thu, 3 Dec 2015 16:12:09 +0100
> Subject: [PATCH] import: cran: Parse DESCRIPTION instead of HTML.
> * guix/import/cran.scm (description->alist, listify,
>   beautify-description, description->package): New procedures.
> (table-datum, downloads->url, nodes->text, cran-sxml->sexp): Remove
> proceduces.
> (latest-release): Use parsed DESCRIPTION instead of SXML.
> * tests/cran.scm: Rewrite to match importer.


> +  (let ((url (string-append %cran-url name "/DESCRIPTION")))
> +    ((compose description->alist read-string) (http-fetch url))))

I think this is best written as:

  (description->alist (read-list (http-fetch url)))


  (define cran-fetch
    (compose description->alist read-string http-fetch
             (cut string-append %cran-url <> "/DESCRIPTION")))

but not something in between.  :-)

Otherwise LGTM.

Thank you!


reply via email to

[Prev in Thread] Current Thread [Next in Thread]