Well that's really odd: I modded the paths in init.el and did the following:
emacs -Q -l init.el foo.org When I eval'ed the code block in foo.org (twice) I still get message: "Code block returned no value" I've attached the inferior haskell buffer and all relevant files.
init.el
Description: Binary data
foo.org
Description: Binary data
GHClet fac n = product [1..n] [(x,fac x) | x <- [0..11]] "org-babel-haskell-eoe" i, version 7.6.3: http://www.haskell.org/ghc/ :? for help Loading package ghc-prim ... linking ... done. Loading package integer-gmp ... linking ... done. Loading package base ... linking ... done. > [(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" > 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" >
-- Looks like we are on the same versions of emacs and ghc: ix@psi(0) [re](4843)> emacs --version GNU Emacs 24.3.1 Copyright (C) 2013 Free Software Foundation, Inc. GNU Emacs comes with ABSOLUTELY NO WARRANTY. You may redistribute copies of Emacs under the terms of the GNU General Public License. For more information about these matters, see the file named COPYING. ix@psi(0) [re](4844)> ghc --version The Glorious Glasgow Haskell Compilation System, version 7.6.3 Org-mode version 8.0.3 (8.0.3-30-g56b864-elpa @ /Users/ix/.emacs.d/elpa/org-20130610/) ________ As far as I can tell the raw data from inferior-haskell mode is returned but the parsing returns null… the raw value from: (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))) ___ > ("> > [(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\" > " "") ----- (results (mapcar #'org-babel-haskell-read-string (cdr (member org-babel-haskell-eoe (reverse (mapcar #'org-babel-trim raw))))))) but results is nil __________ I might be worth noting I am running on OS X not Linux but the raw data looks reasonable to me… Simon Beaumont On 10 Jun 2013, at 23:53, Eric Schulte <schulte.e...@gmail.com> wrote: > Simon Beaumont <si...@datalligator.com> writes: > >> 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 can't reproduce this problem. With a minimal emacs config started > with -Q, and loading the attached init.el file (you'll have to update > the paths to work with your system). > > <init.el> > I'm able to execute the following Org-mode file returning a table of > results as expected (although I have to execute it twice, presumably to > clear out some cruft at the beginning of the haskell session). > > #+begin_src haskell > let fac n = product [1..n] > [(x,fac x) | x <- [0..11]] > #+end_src > > I'm using > > $ emacs --version > GNU Emacs 24.3.1 > Copyright (C) 2013 Free Software Foundation, Inc. > GNU Emacs comes with ABSOLUTELY NO WARRANTY. > You may redistribute copies of Emacs > under the terms of the GNU General Public License. > For more information about these matters, see the file named COPYING. > > $ ghc --version > The Glorious Glasgow Haskell Compilation System, version 7.6.3 > > Org-mode version 8.0.3 (release_8.0.3-215-g8e1e6f @ > /home/eschulte/src/org-mode/lisp/) > > -- > Eric Schulte > http://cs.unm.edu/~eschulte