Federico Beffa <be...@ieee.org> skribis: > My intention wasn't to make an "universal" Cabal parser for two reasons: > (i) I've not found any full, formal description of the file format. I > could in principle deduce it from the Haskell code, but I'm just > starting to learn Haskell. > (ii) I don't see any use of Cabal files in the Scheme world, but maybe > I'm just blind :-)
You’re right, of course ;-), but thinking in terms of separate libraries can help structure the code IMO. >> Anyway, I’ve probably used enough of your time by now. :-) >> If this discussion gives you ideas on how to structure the code, that is >> fine, but otherwise we can probably go with the architecture you >> propose. >> >> How does that sound? > > I think that restructuring the code as you suggest requires quite a > bit of effort. At this point in time I'm not ready to invest the > required time. If one day I will decide to work on improving the code > to make it handle block structured files, that may be the right moment > to reorganize it. Sounds good! > Please find attached updated patches with added documentation, two > more tests, and an option to disable the inclusion of dependencies > only requited by the test-suite of the package. > 'read-cabal' now takes a port and 'strip-cabal' was renamed as > suggested and made local to the former. If parsing fails now an > exception of type '&message' is raised with a meaningful message. OK. > From 633bfb5af57f707dea12ab747133182d085951ff Mon Sep 17 00:00:00 2001 > From: Federico Beffa <be...@fbengineering.ch> > Date: Sat, 7 Mar 2015 17:23:14 +0100 > Subject: [PATCH 01/29] import: Add hackage importer. > > * guix/scripts/import.scm (importers): Add hackage. > * guix/scripts/import/hackage.scm: New file. > * po/guix/POTFILES.in: Add guix/scripts/import.scm. > * doc/guix.texi: Add section on 'hackage' importer. [...] > +The command below imports meta-data for latest version of the ^^^ + “the” > From efb8a09ce3aee85ef73206be2957ef6c4e3360a2 Mon Sep 17 00:00:00 2001 > From: Federico Beffa <be...@fbengineering.ch> > Date: Sun, 8 Mar 2015 07:48:38 +0100 > Subject: [PATCH 02/29] import: Add hackage importer. > > * guix/import/hackage.scm: New file. > * tests/hackage.scm: New file. Perfect! OK to push these two. Thanks for your patience and for the great work! Ludo’.