[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
04/272: guix: import: stackage: Fix JSON accessors.
From: |
Ricardo Wurmus |
Subject: |
04/272: guix: import: stackage: Fix JSON accessors. |
Date: |
Mon, 1 Oct 2018 06:13:01 -0400 (EDT) |
rekado pushed a commit to branch master
in repository guix.
commit 127586adfb4228576d124ad5fa5cb6eacc29ea0f
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))))))
- branch master updated (f9051e3 -> 5289158), Ricardo Wurmus, 2018/10/01
- 01/272: gnu: ghc: Use GHC 8.4.3 as the default GHC., Ricardo Wurmus, 2018/10/01
- 05/272: gnu: cabal-doctest: Update Cabal file to r1., Ricardo Wurmus, 2018/10/01
- 07/272: gnu: ghc-base-prelude: Update to 1.3., Ricardo Wurmus, 2018/10/01
- 13/272: gnu: ghc-happy: Update to 1.19.9., Ricardo Wurmus, 2018/10/01
- 14/272: gnu: ghc-ieee754: Update to 0.8.0., Ricardo Wurmus, 2018/10/01
- 04/272: guix: import: stackage: Fix JSON accessors.,
Ricardo Wurmus <=
- 06/272: gnu: ghc-basement: Update to 0.0.8., Ricardo Wurmus, 2018/10/01
- 08/272: gnu: ghc-cmdargs: Update to 0.10.20., Ricardo Wurmus, 2018/10/01
- 09/272: gnu: ghc-colour: Update to 2.3.4., Ricardo Wurmus, 2018/10/01
- 28/272: gnu: ghc-unix-compat: Update to 0.5.1., Ricardo Wurmus, 2018/10/01
- 21/272: gnu: ghc-setlocale: Update to 1.0.0.8., Ricardo Wurmus, 2018/10/01
- 30/272: gnu: ghc-utf8-string: Update Cabal file to r3., Ricardo Wurmus, 2018/10/01
- 31/272: gnu: ghc-wl-pprint: Update to 1.2.1., Ricardo Wurmus, 2018/10/01
- 11/272: gnu: ghc-entropy: Update to 0.4.1.1., Ricardo Wurmus, 2018/10/01
- 10/272: gnu: ghc-easy-file: Update to 0.2.2., Ricardo Wurmus, 2018/10/01
- 03/272: build-system: haskell: Add #:cabal-revision argument., Ricardo Wurmus, 2018/10/01