diff options
author | Marius Bakke <marius@gnu.org> | 2022-07-22 01:09:14 +0200 |
---|---|---|
committer | Marius Bakke <marius@gnu.org> | 2022-07-22 01:09:14 +0200 |
commit | 9044b086ddca64a62966a83cbf1b82d32dece89e (patch) | |
tree | 2c7f910c9100b2f2a752d07fe0ec44be83fb7600 /tests/monads.scm | |
parent | 5dfc6ab1ab292b87ceea144aa661d0e64c834031 (diff) | |
parent | abea091dbef2d44e6eb46bd2413bdf917e14d095 (diff) |
Merge branch 'staging' into core-updates
Diffstat (limited to 'tests/monads.scm')
-rw-r--r-- | tests/monads.scm | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/tests/monads.scm b/tests/monads.scm index 18bf4119be..19b74f4fb9 100644 --- a/tests/monads.scm +++ b/tests/monads.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2013, 2014, 2015, 2016, 2022 Ludovic Courtès <ludo@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -137,6 +137,19 @@ %monads %monad-run)) +(test-assert "mparameterize" + (let ((parameter (make-parameter 'outside))) + (every (lambda (monad run) + (equal? + (run (mlet monad ((outer (return (parameter))) + (inner + (mparameterize monad ((parameter 'inside)) + (return (parameter))))) + (return (list outer inner (parameter))))) + '(outside inside outside))) + %monads + %monad-run))) + (test-assert "mlet* + text-file + package-file" (run-with-store %store (mlet* %store-monad ((guile (package-file %bootstrap-guile "bin/guile")) |