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: Thu, 13 Jun 2013 10:35:27 +0100 Message-ID: <6BC536CA-433B-4498-B648-871A57EA98ED@datalligator.com> References: <87txl5h91a.fsf@gmail.com> <2F1F01A1-5D4D-4EAC-8B30-A9DE6177137A@datalligator.com> <87txl2fv0k.fsf@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59757) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Un3wN-0007ed-Vp for emacs-orgmode@gnu.org; Thu, 13 Jun 2013 05:35:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Un3wK-000731-QJ for emacs-orgmode@gnu.org; Thu, 13 Jun 2013 05:35:35 -0400 Received: from moutng.kundenserver.de ([212.227.17.9]:65513) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Un3wK-00072l-II for emacs-orgmode@gnu.org; Thu, 13 Jun 2013 05:35:32 -0400 In-Reply-To: <87txl2fv0k.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 Hi Eric, Thanks for investigating this. You got it! The blooming prompt! As you say the comint parser expects = "Prelude>" and I have customised my prompt in .ghci (also this wouldn't = work with module loads like :m +Mymodule.Foo as this changes the ghci = prompt).=20 BTW if I use a unicode sequence for the prompt (like a greek lambda as a = few knights of the lambda calculus do) then accept-process-output = hangs!=20 Well at least that's me fixed! Would it be possible for comint to learn = the prompt by sending an empty line and then adapting? -- It would need = to do this every time it sees a :command and at startup. Of course this = is ghci specific. Or is the answer to write an evaluation server for ghc with a well = defined client API? Then Haskell integration gets a lot easier -- this = would be like slime (common-lisp) for Haskell. Might be worth an enquiry = on the Haskell list as there is a Haskell API that might cover the = requirement. Simon Beaumont ------------------- On 13 Jun 2013, at 06:18, Eric Schulte wrote: > Simon Beaumont writes: >=20 >> Well that's really odd: I modded the paths in init.el and did the = following: >>=20 >> emacs -Q -l init.el foo.org >>=20 >> 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. >>=20 >> (add-to-list 'load-path "~/.emacs.d/elpa/haskell-mode-20130610.152") >=20 > I thought maybe it could be a difference between our haskell modes, so = I > switched to the latest available through my elpa (haskell-mode-13.6), > and I still see the correct behavior. >=20 >> 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 >=20 > My *haskell* buffer looks different then yours. Namely I have > "Prelude>" where as you just have ">". I don't know if this is > significant. Maybe you've customized your ghci prompts in such a way > that the comint functions can no longer recognize where output begins? >=20 > ,---- > | GHCi, version 7.6.3: http://www.haskell.org/ghc/ :? for help > | Loading package ghc-prim ... let fac n =3D product [1..n] > | [(x,fac x) | x <- [0..11]] > | "org-babel-haskell-eoe" > | linking ... done. > | Loading package integer-gmp ... linking ... done. > | Loading package base ... linking ... done. > | Prelude> Prelude> = [(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)] > | Prelude> "org-babel-haskell-eoe" > | Prelude> let fac n =3D product [1..n] > | [(x,fac x) | x <- [0..11]] > | "org-babel-haskell-eoe" > | Prelude> = [(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)] > | Prelude> "org-babel-haskell-eoe" > | Prelude>=20 > `---- >=20 > I'm not sure what else this could be. One option would be to = instrument > `org-babel-execute:haskell' or `org-babel-comint-with-output' with > edebug, and then step through evaluation to see if you can pinpoint > where the problem lies. >=20 > Hope this helps, >=20 > --=20 > Eric Schulte > http://cs.unm.edu/~eschulte