From mboxrd@z Thu Jan 1 00:00:00 1970 From: "numbchild@gmail.com" Subject: Re: ob-haskell evaluation needs inf-haskell but it does not exist Date: Sat, 18 Nov 2017 00:16:29 +0800 Message-ID: References: <87bmk6uqty.fsf@alphaville.usersys.redhat.com> <87fu9fy2pp.fsf@alphaville.usersys.redhat.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="001a11352de000af2a055e301191" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56876) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eFjKB-0007vL-2f for emacs-orgmode@gnu.org; Fri, 17 Nov 2017 11:17:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eFjK9-0003p8-9p for emacs-orgmode@gnu.org; Fri, 17 Nov 2017 11:17:03 -0500 Received: from mail-oi0-x22d.google.com ([2607:f8b0:4003:c06::22d]:35613) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eFjK9-0003nZ-31 for emacs-orgmode@gnu.org; Fri, 17 Nov 2017 11:17:01 -0500 Received: by mail-oi0-x22d.google.com with SMTP id e142so1989188oih.2 for ; Fri, 17 Nov 2017 08:17:00 -0800 (PST) In-Reply-To: <87fu9fy2pp.fsf@alphaville.usersys.redhat.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" To: Nick Dokos Cc: Org-mode --001a11352de000af2a055e301191 Content-Type: text/plain; charset="UTF-8" I setted `haskell-process-type` to 'ghci. I evaluated a simple haskell src block, but it reports I need have a `*haskell*` inferior. Then I executed command [M-x run-haskell]. Then I get error: Debugger entered--Lisp error: (wrong-type-argument stringp nil) expand-file-name(nil) locate-dominating-file(nil "cabal.sandbox.config") haskell-process-type() haskell-program-name-with-args() inferior-haskell-start-process() inferior-haskell-process() run-haskell() funcall-interactively(run-haskell) call-interactively(run-haskell record nil) command-execute(run-haskell record) #f(compiled-function (cmd) #)("run-haskell") ivy-call() ivy-read("M-x " [special-lispy-clone .... counsel-M-x() funcall-interactively(counsel-M-x) call-interactively(counsel-M-x nil nil) command-execute(counsel-M-x) [stardiviner] GPG key ID: 47C32433 IRC(freeenode): stardiviner Twitter: @numbchild Key fingerprint = 9BAA 92BC CDDD B9EF 3B36 CB99 B8C4 B8E5 47C3 2433 Blog: http://stardiviner.github.io/ On Wed, Nov 15, 2017 at 11:35 PM, Nick Dokos wrote: > "numbchild@gmail.com" writes: > > > I checked out your answer, I have meet all your said requirements. GHCi, > inf-haskell (after I installed package haskell-mode) and setting > `haskell-program-name`, I found there is no > > `defcustom` variable option named `haskell-program-name` at all. > > You probably need to set haskell-process-type to ghci. If that works, > please let me know and I'll update the answer on SO. > > > > > [stardiviner] GPG key ID: 47C32433 > > IRC(freeenode): stardiviner Twitter: @numbchild > > Key fingerprint = 9BAA 92BC CDDD B9EF 3B36 CB99 B8C4 B8E5 47C3 2433 > > Blog: http://stardiviner.github.io/ > > > > On Wed, Nov 15, 2017 at 9:17 PM, numbchild@gmail.com < > numbchild@gmail.com> wrote: > > > > I required `(require 'inf-haskell)` But have not found the command > `inf-haskell` to start inferior process. > > > > [stardiviner] GPG key ID: 47C32433 > > IRC(freeenode): stardiviner Twitter: @numbchild > > Key fingerprint = 9BAA 92BC CDDD B9EF 3B36 CB99 B8C4 B8E5 47C3 2433 > > Blog: http://stardiviner.github.io/ > > > > On Mon, Nov 13, 2017 at 11:43 PM, Nick Dokos > wrote: > > > > stardiviner writes: > > > > > When I execute the following Haskell src block: > > > > > > ``` > > > > > > #+BEGIN_SRC haskell :session :tangle "Data/Code/hello_world.hs" > > > main :: IO () > > > main = do > > > putStrLn "Hello, World!" > > > #+END_SRC > > > > > > ``` > > > > > > It reports error: > > > > > > ``` > > > > > > Debugger entered--Lisp error: (file-missing "Cannot open load > file" "No > > > such file or directory" "inf-haskell") > > > require(inf-haskell) > > > > See my answer to this SO question: > > > > https://stackoverflow.com/questions/42081379/how-to-set- > up-org-babel-for-haskell-with-stack > > > > for some details on setting up the environment. > > > > -- > > Nick > > > > -- > Nick > > > --001a11352de000af2a055e301191 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I setted `haskell-process-type` to 'ghci.
I e= valuated a simple haskell src block, but it reports I need have a `*haskell= *` inferior. Then I executed command [M-x run-haskell].
Then I get err= or:

Debugger entered--Lisp error: (wrong-type-argument strin= gp nil)
=C2=A0 expand-file-name(nil)
=C2=A0 locate-dominating-file(ni= l "cabal.sandbox.config")
=C2=A0 haskell-process-type()
=C2= =A0 haskell-program-name-with-args()
=C2=A0 inferior-haskell-start-proce= ss()
=C2=A0 inferior-haskell-process()
=C2=A0 run-haskell()
=C2=A0= funcall-interactively(run-haskell)
=C2=A0 call-interactively(run-haskel= l record nil)
=C2=A0 command-execute(run-haskell record)
=C2=A0 #f(co= mpiled-function (cmd) #<bytecode 0x244f2f9>)("run-haskell")=
=C2=A0 ivy-call()
=C2=A0 ivy-read("M-x " [special-lispy-cl= one
=C2=A0 ....
=C2=A0 counsel-M-x()
=C2=A0 funcall-i= nteractively(counsel-M-x)
=C2=A0 call-interactively(counsel-M-x nil nil)=
=C2=A0 command-execute(counsel-M-x)

[stardiviner]= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 <Hack this = world!>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 GPG key ID: 47C32433
IRC(freeen= ode): stardiviner =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Twitter:=C2=A0 @n= umbchild
Key fingerprint =3D 9BAA 92BC CDDD B9EF 3B36=C2=A0 CB99 B8C4 B8= E5 47C3 2433
Blog: http://stardiviner.github.io/

On Wed, Nov 15, 2017 at 11:35 PM, Nick Dokos= <ndokos@gmail.com> wrote:
= "numbchild@gma= il.com" <numbchild@gmail= .com> writes:

> I checked out your answer, I have meet all your said requirements. GHC= i, inf-haskell (after I installed package haskell-mode) and setting `haskel= l-program-name`, I found there is no
> `defcustom` variable option named `haskell-program-name` at all.

You probably need to set haskell-process-type to ghci. If that works= , please let me know and I'll update the answer on SO.

>
> [stardiviner]=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 <Hack this world!>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 GPG key ID: 47C3= 2433
> IRC(freeenode): stardiviner =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Tw= itter:=C2=A0 @numbchild
> Key fingerprint =3D 9BAA 92BC CDDD B9EF 3B36=C2=A0 CB99 B8C4 B8E5 47C3= 2433
> Blog: http://stardiviner.github.io/
>
> On Wed, Nov 15, 2017 at 9:17 PM, numbchild@gmail.com <numbch= ild@gmail.com> wrote:
>
>=C2=A0 =C2=A0 =C2=A0I required `(require 'inf-haskell)` But have no= t found the command `inf-haskell` to start inferior process.
>
>=C2=A0 =C2=A0 =C2=A0[stardiviner]=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 <Hack this world!>=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 GPG key ID: 47C32433
>=C2=A0 =C2=A0 =C2=A0IRC(freeenode): stardiviner =C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 Twitter:=C2=A0 @numbchild
>=C2=A0 =C2=A0 =C2=A0Key fingerprint =3D 9BAA 92BC CDDD B9EF 3B36=C2=A0 = CB99 B8C4 B8E5 47C3 2433
>=C2=A0 =C2=A0 =C2=A0Blog: http://stardiviner.github.io/
>
>=C2=A0 =C2=A0 =C2=A0On Mon, Nov 13, 2017 at 11:43 PM, Nick Dokos <ndokos@gmail.com> wrote:
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0stardiviner <numbchild@gmail.com> writes:
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0> When I execute the following Has= kell src block:
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0> ```
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0> #+BEGIN_SRC haskell :session :ta= ngle "Data/Code/hello_world.hs"
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0> main :: IO ()
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0> main =3D do
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0> =C2=A0 putStrLn "Hello, Wor= ld!"
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0> #+END_SRC
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0> ```
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0> It reports error:
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0> ```
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0> Debugger entered--Lisp error: (f= ile-missing "Cannot open load file" "No
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0> such file or directory" &qu= ot;inf-haskell")
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0> =C2=A0 require(inf-haskell)
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0See my answer to this SO question: >
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=C2=A0 https://stackoverflow.com/question= s/42081379/how-to-set-up-org-babel-for-haskell-with-stack
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0for some details on setting up the en= vironment.
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0--
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Nick
>

--
Nick



--001a11352de000af2a055e301191--