[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
04/257: guix: import: stackage: Fix JSON accessors.
From: |
Ricardo Wurmus |
Subject: |
04/257: guix: import: stackage: Fix JSON accessors. |
Date: |
Thu, 27 Sep 2018 15:46:46 -0400 (EDT) |
rekado pushed a commit to branch wip-haskell
in repository guix.
commit fc14ef886b2b349efc7fec487699039d8db52d70
Author: Timothy Sample <address@hidden>
Date: Tue Aug 28 09:45:36 2018 -0400
guix: import: stackage: Fix JSON accessors.
* guix/import/stackage.scm (lts-info-ghc-version, lst-info-packages): Use
assoc-ref for accessing parsed JSON.
---
guix/import/stackage.scm | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/guix/import/stackage.scm b/guix/import/stackage.scm
index afd5d99..1c1e73a 100644
--- a/guix/import/stackage.scm
+++ b/guix/import/stackage.scm
@@ -43,15 +43,12 @@
(define (lts-info-ghc-version lts-info)
"Retruns the version of the GHC compiler contained in LTS-INFO."
- (match lts-info
- ((("snapshot" ("ghc" . version) _ _) _) version)
- (_ #f)))
+ (and=> (assoc-ref lts-info "snapshot")
+ (cut assoc-ref <> "ghc")))
(define (lts-info-packages lts-info)
- "Returns the alist of packages contained in LTS-INFO."
- (match lts-info
- ((("packages" pkg ...) . _) pkg)
- (_ '())))
+ "Retruns the alist of packages contained in LTS-INFO."
+ (or (assoc-ref lts-info "packages") '()))
(define (leave-with-message fmt . args)
(raise (condition (&message (message (apply format #f fmt args))))))
- 42/257: gnu: ghc-old-time: Update Cabal file to r2., (continued)
- 42/257: gnu: ghc-old-time: Update Cabal file to r2., Ricardo Wurmus, 2018/09/27
- 38/257: gnu: ghc-generics-sop: Update to 0.3.2.0., Ricardo Wurmus, 2018/09/27
- 31/257: gnu: ghc-wl-pprint: Update to 1.2.1., Ricardo Wurmus, 2018/09/27
- 26/257: gnu: ghc-unbounded-delays: Update to 0.1.1.0., Ricardo Wurmus, 2018/09/27
- 22/257: gnu: ghc-simple-reflect: Update to 0.3.3., Ricardo Wurmus, 2018/09/27
- 15/257: gnu: ghc-microlens: Update to 0.4.9.1., Ricardo Wurmus, 2018/09/27
- 14/257: gnu: ghc-ieee754: Update to 0.8.0., Ricardo Wurmus, 2018/09/27
- 10/257: gnu: ghc-easy-file: Update to 0.2.2., Ricardo Wurmus, 2018/09/27
- 08/257: gnu: ghc-cmdargs: Update to 0.10.20., Ricardo Wurmus, 2018/09/27
- 07/257: gnu: ghc-base-prelude: Update to 1.3., Ricardo Wurmus, 2018/09/27
- 04/257: guix: import: stackage: Fix JSON accessors.,
Ricardo Wurmus <=
- 06/257: gnu: ghc-basement: Update to 0.0.8., Ricardo Wurmus, 2018/09/27
- 05/257: gnu: cabal-doctest: Update Cabal file to r1., Ricardo Wurmus, 2018/09/27
- 151/257: gnu: ghc-gluraw: Update to 2.0.0.4., Ricardo Wurmus, 2018/09/27
- 75/257: gnu: ghc-split: Update to 0.2.3.3., Ricardo Wurmus, 2018/09/27
- 92/257: gnu: ghc-exceptions: Update to 0.10.0., Ricardo Wurmus, 2018/09/27
- 66/257: gnu: ghc-edisoncore: Update to 1.3.2.1., Ricardo Wurmus, 2018/09/27
- 53/257: gnu: ghc-system-filepath-bootstrap: Update to 0.4.14., Ricardo Wurmus, 2018/09/27
- 37/257: gnu: ghc-foundation: Update to 0.0.21., Ricardo Wurmus, 2018/09/27
- 32/257: gnu: ghc-xhtml: Update to 3000.2.2.1., Ricardo Wurmus, 2018/09/27
- 23/257: gnu: ghc-stringbuilder: Update to 0.5.1., Ricardo Wurmus, 2018/09/27