diff options
author | Eric Schulte <schulte.eric@gmail.com> | 2013-04-06 10:43:57 -0600 |
---|---|---|
committer | Eric Schulte <schulte.eric@gmail.com> | 2013-04-06 11:39:23 -0600 |
commit | 4b51984fe7706335b54fab29fbf9006cced740cd (patch) | |
tree | d900eb6df79810b35276c0b4c1cf22b56c43fc22 | |
parent | 7117ad4f923914573aa2ee6b957787033edb3923 (diff) | |
download | org-mode-4b51984fe7706335b54fab29fbf9006cced740cd.tar.gz |
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.
-rw-r--r-- | lisp/ob-haskell.el | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lisp/ob-haskell.el b/lisp/ob-haskell.el index a04963f..6f0fbcd 100644 --- a/lisp/ob-haskell.el +++ b/lisp/ob-haskell.el @@ -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)) |