On Wed, Feb 8, 2017 at 4:30 PM, Ludovic Courtès <l...@gnu.org> wrote: > Hello Federico, > > Federico Beffa <be...@ieee.org> skribis:
> [...] >> + (if name-version >> + (hackage->guix-package name-version >> + #:include-test-dependencies? >> + include-test-dependencies?) >> + (begin >> + (format (current-error-port) >> + "guix import stackage: package not found: ~a~%" >> package-name) >> + #f)))) > > The ‘if’ is unnecessary here: (guix scripts import) produces an error > message when an importer returns something other than a ‘package’ sexp. I've implemented all suggested changes apart from this one for two reasons: * If the package is not included in an LTS release then the procedure generating name-version returns #f. If I remove the 'if' then hackage->guix-package will be called with a boolean instead of a string as the first parameter and that will throw an exception. * Here we can give a more accurate error message: we can say that the package was not found in the LTS release, while, by returning, the error would be "failed to download cabal file" which is somewhat misleading. Thanks for the review. Fede