diff options
author | Marius Bakke <mbakke@fastmail.com> | 2018-10-05 19:15:39 +0200 |
---|---|---|
committer | Marius Bakke <mbakke@fastmail.com> | 2018-10-05 19:15:39 +0200 |
commit | cf6db76d2af2f287f12928df160447ab4165b3e5 (patch) | |
tree | 49a1309c0e04c00090ab106f7ae3495a6da328c1 /guix/import | |
parent | e65b2181e8b436278e3dd0b405602a400fbd0a75 (diff) | |
parent | a6798218bea0d6b2df598042d1ced29f74bb4250 (diff) | |
download | guix-patches-cf6db76d2af2f287f12928df160447ab4165b3e5.tar guix-patches-cf6db76d2af2f287f12928df160447ab4165b3e5.tar.gz |
Merge branch 'master' into core-updates
Diffstat (limited to 'guix/import')
-rw-r--r-- | guix/import/stackage.scm | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/guix/import/stackage.scm b/guix/import/stackage.scm index afd5d997ae..1c1e73a723 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)))))) |