diff options
author | Ludovic Courtès <ludo@gnu.org> | 2022-07-10 12:39:44 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2022-07-10 23:57:14 +0200 |
commit | 9fdc4b6c283c5aa5cf10205d87fb2c58b829b9d0 (patch) | |
tree | 9458f4783146777e11efb0de96aa6677fe5d73d0 /etc | |
parent | bf0a646a5bcde489b602c58fbb63a93acb9d08f6 (diff) | |
download | guix-9fdc4b6c283c5aa5cf10205d87fb2c58b829b9d0.tar.gz |
monads: Add 'mparameterize'.
* etc/system-tests.scm (mparameterize): Move to... * guix/monads.scm (mparameterize): ... here. * tests/monads.scm ("mparameterize"): New test. * .dir-locals.el (c-mode): Add it.
Diffstat (limited to 'etc')
-rw-r--r-- | etc/system-tests.scm | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/etc/system-tests.scm b/etc/system-tests.scm index de6f592dee..cd22b7e6d3 100644 --- a/etc/system-tests.scm +++ b/etc/system-tests.scm @@ -43,21 +43,6 @@ determined." (repository-close! repository)) #f)))) -(define-syntax mparameterize - (syntax-rules () - "This form implements dynamic scoping, similar to 'parameterize', but in a -monadic context." - ((_ monad ((parameter value) rest ...) body ...) - (let ((old-value (parameter))) - (mbegin monad - ;; XXX: Non-local exits are not correctly handled. - (return (parameter value)) - (mlet monad ((result (mparameterize monad (rest ...) body ...))) - (parameter old-value) - (return result))))) - ((_ monad () body ...) - (mbegin monad body ...)))) - (define (tests-for-current-guix source commit) "Return a list of tests for perform, using Guix built from SOURCE, a channel instance." |