;; this will return true during compilation (i.e. after the call to
;; `bind-func' but before the type of the closure is finalised)
(define impc:ti:closure-is-being-compiled?
(lambda (closure-name)
(let ((res (impc:ti:get-closure-type closure-name)))
(if res #t #f))))