From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Beaumont Subject: Re: Bug: Babel Haskell mode [8.0.3 (8.0.3-30-g56b864-elpa @ /Users/ix/.emacs.d/elpa/org-20130610/)] Date: Tue, 11 Jun 2013 16:15:07 +0100 Message-ID: <2F1F01A1-5D4D-4EAC-8B30-A9DE6177137A@datalligator.com> References: <87txl5h91a.fsf@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Content-Type: multipart/mixed; boundary="Apple-Mail=_F61F04B5-6E7A-4F71-ABC4-3E1AD8AD93E5" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58251) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UmQWZ-0001JC-CX for emacs-orgmode@gnu.org; Tue, 11 Jun 2013 11:30:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UmQI1-0006Nr-0D for emacs-orgmode@gnu.org; Tue, 11 Jun 2013 11:15:23 -0400 Received: from moutng.kundenserver.de ([212.227.17.8]:51551) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UmQI0-0006Nd-MQ for emacs-orgmode@gnu.org; Tue, 11 Jun 2013 11:15:16 -0400 In-Reply-To: <87txl5h91a.fsf@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-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: Eric Schulte Cc: emacs-orgmode@gnu.org --Apple-Mail=_F61F04B5-6E7A-4F71-ABC4-3E1AD8AD93E5 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii 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. --Apple-Mail=_F61F04B5-6E7A-4F71-ABC4-3E1AD8AD93E5 Content-Disposition: attachment; filename=init.el Content-Type: application/octet-stream; name="init.el" Content-Transfer-Encoding: quoted-printable (add-to-list=20'load-path=20"~/.emacs.d/elpa/haskell-mode-20130610.152")=0D= =0A(add-to-list=20'load-path=20"~/.emacs.d/elpa/org-20130610")=0D=0A= (require=20'org)=0D=0A(setq=20org-export-babel-evaluate=20t=0D=0A=20=20=20= =20=20=20org-confirm-babel-evaluate=20nil)=0D=0A= (org-babel-do-load-languages=0D=0A=20=20=20=20=20=20= 'org-babel-load-languages=0D=0A=20=20=20=20=20=20'((haskell=20.=20t)))=0D= =0A= --Apple-Mail=_F61F04B5-6E7A-4F71-ABC4-3E1AD8AD93E5 Content-Disposition: attachment; filename=foo.org Content-Type: application/octet-stream; name="foo.org" Content-Transfer-Encoding: 7bit #+begin_src haskell let fac n = product [1..n] [(x,fac x) | x <- [0..11]] #+end_src #+results: --Apple-Mail=_F61F04B5-6E7A-4F71-ABC4-3E1AD8AD93E5 Content-Disposition: attachment; filename=inf-haskell.txt Content-Type: text/plain; name="inf-haskell.txt" Content-Transfer-Encoding: quoted-printable GHClet fac n =3D 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,3628= 80),(10,3628800),(11,39916800)] > "org-babel-haskell-eoe" > let fac n =3D 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,3628= 80),(10,3628800),(11,39916800)] > "org-babel-haskell-eoe" >=20= --Apple-Mail=_F61F04B5-6E7A-4F71-ABC4-3E1AD8AD93E5 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 -- 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=85 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,3628= 80),(10,3628800),(11,39916800)] =20 > \"org-babel-haskell-eoe\" = =20 " "") ----- (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=85 Simon Beaumont On 10 Jun 2013, at 23:53, Eric Schulte wrote: > Simon Beaumont writes: >=20 >> Whenever I try and evaluate the Haskell code block I get: >> "Code block returned no value." >>=20 >> #+begin_src haskell :results value >> let fac n =3D product [1..n] >> [(x,fac x) | x <- [0..11]] >> #+end_src >>=20 >> #+results: >>=20 >=20 > 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). >=20 > > 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). >=20 > #+begin_src haskell > let fac n =3D product [1..n] > [(x,fac x) | x <- [0..11]] > #+end_src >=20 > I'm using >=20 > $ 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. >=20 > $ ghc --version > The Glorious Glasgow Haskell Compilation System, version 7.6.3 >=20 > Org-mode version 8.0.3 (release_8.0.3-215-g8e1e6f @ = /home/eschulte/src/org-mode/lisp/) >=20 > --=20 > Eric Schulte > http://cs.unm.edu/~eschulte --Apple-Mail=_F61F04B5-6E7A-4F71-ABC4-3E1AD8AD93E5--