Add some syntax to prevent inlining within modules
This is relevant, as it prevents the mock function used in tests working with Guile 3.
This commit is contained in:
parent
73be24d8ac
commit
f4922fc904
1 changed files with 5 additions and 1 deletions
|
|
@ -17,7 +17,8 @@
|
|||
|
||||
(define-module (guix-data-service utils)
|
||||
#:export (call-with-time-logging
|
||||
with-time-logging))
|
||||
with-time-logging
|
||||
prevent-inlining-for-tests))
|
||||
|
||||
(define (call-with-time-logging action thunk)
|
||||
(simple-format #t "debug: Starting ~A\n" action)
|
||||
|
|
@ -31,3 +32,6 @@
|
|||
(define-syntax-rule (with-time-logging action exp ...)
|
||||
"Log under NAME the time taken to evaluate EXP."
|
||||
(call-with-time-logging action (lambda () exp ...)))
|
||||
|
||||
(define-syntax-rule (prevent-inlining-for-tests var)
|
||||
(set! var var))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue