Merge branch 'maint'
This commit is contained in:
commit
e8b71b86d2
|
@ -59,14 +59,23 @@
|
|||
|
||||
(defvar org-babel-haskell-eoe "\"org-babel-haskell-eoe\"")
|
||||
|
||||
(defvar haskell-prompt-regexp)
|
||||
|
||||
(defun org-babel-execute:haskell (body params)
|
||||
"Execute a block of Haskell code."
|
||||
(require 'inf-haskell)
|
||||
(add-hook 'inferior-haskell-hook
|
||||
(lambda ()
|
||||
(setq-local comint-prompt-regexp
|
||||
(concat haskell-prompt-regexp "\\|^λ?> "))))
|
||||
(let* ((session (cdr (assq :session params)))
|
||||
(result-type (cdr (assq :result-type params)))
|
||||
(full-body (org-babel-expand-body:generic
|
||||
body params
|
||||
(org-babel-variable-assignments:haskell params)))
|
||||
(session (org-babel-haskell-initiate-session session params))
|
||||
(comint-preoutput-filter-functions
|
||||
(cons 'ansi-color-filter-apply comint-preoutput-filter-functions))
|
||||
(raw (org-babel-comint-with-output
|
||||
(session org-babel-haskell-eoe t full-body)
|
||||
(insert (org-trim full-body))
|
||||
|
|
Loading…
Reference in New Issue