From 9fdc4b6c283c5aa5cf10205d87fb2c58b829b9d0 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sun, 10 Jul 2022 12:39:44 +0200 Subject: 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. --- etc/system-tests.scm | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'etc') 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." -- cgit 1.4.1