monads: Use intent-revealing parameter names.

* guix/monads.scm (mwhen, munless): Rename parameters from 'exp0' and 'exp' to
  'mexp0' and 'mexp', respectively.  This makes it more obvious that these
  expressions must be monadic expressions.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
Chris Marusich 2017-04-06 02:28:34 -07:00 committed by Ludovic Courtès
parent 1d65b5379b
commit d922c8e4b7
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 6 additions and 6 deletions

View File

@ -204,23 +204,23 @@ the last one."
(define-syntax mwhen
(syntax-rules ()
"When CONDITION is true, evaluate EXP0..EXP* as in an 'mbegin'. When
"When CONDITION is true, evaluate MEXP0..MEXP* as in an 'mbegin'. When
CONDITION is false, return *unspecified* in the current monad."
((_ condition exp0 exp* ...)
((_ condition mexp0 mexp* ...)
(if condition
(mbegin %current-monad
exp0 exp* ...)
mexp0 mexp* ...)
(return *unspecified*)))))
(define-syntax munless
(syntax-rules ()
"When CONDITION is false, evaluate EXP0..EXP* as in an 'mbegin'. When
"When CONDITION is false, evaluate MEXP0..MEXP* as in an 'mbegin'. When
CONDITION is true, return *unspecified* in the current monad."
((_ condition exp0 exp* ...)
((_ condition mexp0 mexp* ...)
(if condition
(return *unspecified*)
(mbegin %current-monad
exp0 exp* ...)))))
mexp0 mexp* ...)))))
(define-syntax define-lift
(syntax-rules ()