
(define-module (theme-d runtime theme-d-guile-3-support)
  #:export (theme-call-with-prompt
	    theme-get-rte))

(import (rnrs))
(import (theme-d runtime runtime-theme-d-environment))

(define (theme-call-with-prompt
	 type-result type-handler tag thunk handler)
  (call-with-prompt tag
		    (lambda () (_i_call-proc thunk '() '()))
		    (lambda (_ h v)
		      (_i_call-proc
		       handler (list _ h v)
		       (list _b_<object> _b_<object> _b_<object>)))))
 
(define (theme-get-rte exc)
  (let ((proc (exception-accessor &theme-d-condition (lambda (x) x))))
    (proc exc)))
