mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-11-25 07:27:57 +00:00
use org-babel-result-cond in Haskell code blocks
* lisp/ob-haskell.el (org-babel-execute:haskell): Use org-babel-result-cond in Haskell code blocks.
This commit is contained in:
parent
7117ad4f92
commit
4b51984fe7
@ -78,11 +78,12 @@
|
||||
(cdr (member org-babel-haskell-eoe
|
||||
(reverse (mapcar #'org-babel-trim raw)))))))
|
||||
(org-babel-reassemble-table
|
||||
(cond
|
||||
((equal result-type 'output)
|
||||
(mapconcat #'identity (reverse (cdr results)) "\n"))
|
||||
((equal result-type 'value)
|
||||
(org-babel-haskell-table-or-string (car results))))
|
||||
((lambda (result)
|
||||
(org-babel-result-cond (cdr (assoc :result-params params))
|
||||
result (org-babel-haskell-table-or-string result)))
|
||||
(case result-type
|
||||
('output (mapconcat #'identity (reverse (cdr results)) "\n"))
|
||||
('value (car results))))
|
||||
(org-babel-pick-name (cdr (assoc :colname-names params))
|
||||
(cdr (assoc :colname-names params)))
|
||||
(org-babel-pick-name (cdr (assoc :rowname-names params))
|
||||
|
Loading…
Reference in New Issue
Block a user