Function: org-babel-haskell-with-session--worker

org-babel-haskell-with-session--worker is a byte-compiled function defined in ob-haskell.el.gz.

Signature

(org-babel-haskell-with-session--worker PARAMS TODO)

Documentation

See org-babel-haskell-with-session.

Source Code

;; Defined in /usr/src/emacs/lisp/org/ob-haskell.el.gz
(defun org-babel-haskell-with-session--worker (params todo)
  "See `org-babel-haskell-with-session'."
  (let* ((sn (cdr (assq :session params)))
         (session (org-babel-haskell-initiate-session sn params))
         (one-shot (equal sn "none")))
    (unwind-protect
        (funcall todo session)
      (when (and one-shot (buffer-live-p session))
        ;; As we don't control how the session temporary buffer is
        ;; created, we need to explicitly work around the hooks and
        ;; query functions.
        (with-current-buffer session
          (let ((kill-buffer-query-functions nil)
                (kill-buffer-hook nil))
            (kill-buffer session)))))))