From mboxrd@z Thu Jan  1 00:00:00 1970
From: Simon Beaumont <simon@datalligator.com>
Subject: Bug: Babel Haskell mode [8.0.3 (8.0.3-30-g56b864-elpa @
 /Users/ix/.emacs.d/elpa/org-20130610/)]
Date: Mon, 10 Jun 2013 21:07:41 +0100
Message-ID: <m1fvwprape.fsf@psi.home>
Mime-Version: 1.0
Content-Type: text/plain
Return-path: <emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org>
Received: from eggs.gnu.org ([2001:4830:134:3::10]:37073)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <simon@datalligator.com>) id 1Um8OY-0002zO-N7
	for emacs-orgmode@gnu.org; Mon, 10 Jun 2013 16:08:53 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <simon@datalligator.com>) id 1Um8OV-0003lV-Hs
	for emacs-orgmode@gnu.org; Mon, 10 Jun 2013 16:08:50 -0400
Received: from moutng.kundenserver.de ([212.227.17.8]:54965)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <simon@datalligator.com>) id 1Um8OV-0003ku-8T
	for emacs-orgmode@gnu.org; Mon, 10 Jun 2013 16:08:47 -0400
List-Id: "General discussions about Org-mode." <emacs-orgmode.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/emacs-orgmode>,
	<mailto:emacs-orgmode-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/emacs-orgmode>
List-Post: <mailto:emacs-orgmode@gnu.org>
List-Help: <mailto:emacs-orgmode-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/emacs-orgmode>,
	<mailto:emacs-orgmode-request@gnu.org?subject=subscribe>
Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org
Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org
To: emacs-orgmode@gnu.org


Whenever I try and evaluate the Haskell code block I get:
"Code block returned no value."

#+begin_src haskell :results value
  let fac n = product [1..n]
  [(x,fac x) | x <- [0..11]]
#+end_src

#+results:


I am using ghci as my haskell-program
The Haskell source is correctly executed in the *haskell* inferior mode.

> let fac n = product [1..n]
[(x,fac x) | x <- [0..11]]
"org-babel-haskell-eoe"
> [(0,1),(1,1),(2,2),(3,6),(4,24),(5,120),(6,720),(7,5040),(8,40320),(9,362880),(10,3628800),(11,39916800)]
> "org-babel-haskell-eoe"
> 

The raw binding receives appropriate data below but the "parse" is
always null
 
...
(defun org-babel-execute:haskell (body params)
  "Execute a block of Haskell code."
  (let* ((session (cdr (assoc :session params)))
         (vars (mapcar #'cdr (org-babel-get-header params :var)))
         (result-type (cdr (assoc :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))
         ;; ++ we get something like the above here
         (raw (org-babel-comint-with-output
                  (session org-babel-haskell-eoe t full-body)
                (insert (org-babel-trim full-body))
                (comint-send-input nil t)
                (insert org-babel-haskell-eoe)
                (comint-send-input nil t)))
         ;; ++ this is null
         (results (mapcar
                   #'org-babel-haskell-read-string
                   (cdr (member org-babel-haskell-eoe
                                (reverse (mapcar #'org-babel-trim raw)))))))
...

What am I doing wrong?
Thanks for any assistance to fix this - what should we be getting in results?

_________________
Emacs  : GNU Emacs 24.3.1 (x86_64-apple-darwin12.3.0)
 of 2013-05-04 on psi
Package: Org-mode version 8.0.3 (8.0.3-30-g56b864-elpa @ /Users/ix/.emacs.d/elpa/org-20130610/)

current state:
==============
(setq
 org-tab-first-hook '(org-hide-block-toggle-maybe org-src-native-tab-command-maybe org-babel-hide-result-toggle-maybe
                      org-babel-header-arg-expand)
 org-speed-command-hook '(org-speed-command-default-hook org-babel-speed-command-hook)
 org-occur-hook '(org-first-headline-recenter)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-confirm-shell-link-function 'yes-or-no-p
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-babel-pre-tangle-hook '(save-buffer)
 org-mode-hook '(#[nil "\300\301\302\303\304$\207"
                   [org-add-hook change-major-mode-hook org-show-block-all append local] 5]
                 #[nil "\300\301\302\303\304$\207"
                   [org-add-hook change-major-mode-hook org-babel-show-result-all append local] 5]
                 org-babel-result-hide-spec org-babel-hide-all-hashes)
 org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point org-babel-execute-safely-maybe)
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers org-cycle-hide-inline-tasks
                  org-cycle-show-empty-lines org-optimize-window-after-visibility-change)
 org-babel-tangle-lang-exts '(("haskell" . "hs") ("python" . "py") ("emacs-lisp" . "el"))
 org-confirm-elisp-link-function 'yes-or-no-p
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-babel-load-languages '((python . t) (R . t) (haskell . t) (emacs-lisp . t))
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 )