Right now, when executing the following source block

#+begin_src haskell :results output
[1..10]
"hello" == "hello"
   #+end_src

I get the following output:

#+RESULTS:
   : True

Whereas (for me) the desired result would be

#+RESULTS:
   : [1,2,3,4,5,6,7,8,9,10]
   : True

I created the attached patch that achieves the desired result.

Please notice that the default behaviour (without :results output) remains
unchanged.
From 0e7d2ac22a028507eaf5ecc85623b62572ee3de8 Mon Sep 17 00:00:00 2001
From: Roland Coeurjoly <rolandcoeurj...@gmail.com>
Date: Tue, 28 Apr 2020 18:06:50 +0200
Subject: [PATCH] Print all results

---
 lisp/org/ob-haskell.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/org/ob-haskell.el b/lisp/org/ob-haskell.el
index d32a2f7bc0..e5ef0999e0 100644
--- a/lisp/org/ob-haskell.el
+++ b/lisp/org/ob-haskell.el
@@ -145,7 +145,7 @@ org-babel-interpret-Haskell
     (org-babel-reassemble-table
      (let ((result
             (pcase result-type
-              (`output (mapconcat #'identity (reverse (cdr results)) "\n"))
+              (`output (mapconcat #'identity (reverse results) "\n"))
               (`value (car results)))))
        (org-babel-result-cond (cdr (assq :result-params params))
 	 result (org-babel-script-escape result)))
-- 
2.20.1

Reply via email to