emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* ob-haskell evaluation needs inf-haskell but it does not exist
@ 2017-11-12  6:30 stardiviner
  2017-11-13 15:43 ` Nick Dokos
  0 siblings, 1 reply; 6+ messages in thread
From: stardiviner @ 2017-11-12  6:30 UTC (permalink / raw)
  To: emacs-orgmode

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)
  org-babel-haskell-initiate-session(nil ((:colname-names)
(:rowname-names) (:result-params "replace") (:result-type . value)
(:results . "replace") (:exports . "code") (:cache . "no") (:noweb .
"no") (:hlines . "no") (:padlines . "no") (:session) (:tangle .
"Data/Code/hello_world.hs")))
  org-babel-execute:haskell("main :: IO ()\nmain = do\n  putStrLn
\"Hello, World!\"" ((:colname-names) (:rowname-names) (:result-params
"replace") (:result-type . value) (:results . "replace") (:exports .
"code") (:cache . "no") (:noweb . "no") (:hlines . "no") (:padlines .
"no") (:session) (:tangle . "Data/Code/hello_world.hs")))
  org-babel-execute-src-block(nil ("haskell" "main :: IO ()\nmain =
do\n  putStrLn \"Hello, World!\"" ((:colname-names) (:rowname-names)
(:result-params "replace") (:result-type . value) (:results . "replace")
(:exports . "code") (:tangle . "Data/Code/hello_world.hs") (:session)
(:padlines . "no") (:hlines . "no") (:noweb . "no") (:cache . "no")) ""
nil 1127 "(ref:%s)"))
  org-ctrl-c-ctrl-c(nil)
  funcall-interactively(org-ctrl-c-ctrl-c nil)
  call-interactively(org-ctrl-c-ctrl-c nil nil)
  command-execute(org-ctrl-c-ctrl-c)
```   

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: ob-haskell evaluation needs inf-haskell but it does not exist
  2017-11-12  6:30 ob-haskell evaluation needs inf-haskell but it does not exist stardiviner
@ 2017-11-13 15:43 ` Nick Dokos
  2017-11-15 13:17   ` numbchild
  0 siblings, 1 reply; 6+ messages in thread
From: Nick Dokos @ 2017-11-13 15:43 UTC (permalink / raw)
  To: emacs-orgmode

stardiviner <numbchild@gmail.com> 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: ob-haskell evaluation needs inf-haskell but it does not exist
  2017-11-13 15:43 ` Nick Dokos
@ 2017-11-15 13:17   ` numbchild
  2017-11-15 13:19     ` numbchild
  0 siblings, 1 reply; 6+ messages in thread
From: numbchild @ 2017-11-15 13:17 UTC (permalink / raw)
  To: Nick Dokos; +Cc: Org-mode

[-- Attachment #1: Type: text/plain, Size: 1096 bytes --]

I required `(require 'inf-haskell)` But have not found the command
`inf-haskell` to start inferior process.

[stardiviner]           <Hack this world!>      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 <ndokos@gmail.com> wrote:

> stardiviner <numbchild@gmail.com> 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
>
>
>

[-- Attachment #2: Type: text/html, Size: 2223 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: ob-haskell evaluation needs inf-haskell but it does not exist
  2017-11-15 13:17   ` numbchild
@ 2017-11-15 13:19     ` numbchild
  2017-11-15 15:35       ` Nick Dokos
  0 siblings, 1 reply; 6+ messages in thread
From: numbchild @ 2017-11-15 13:19 UTC (permalink / raw)
  To: Nick Dokos; +Cc: Org-mode

[-- Attachment #1: Type: text/plain, Size: 1724 bytes --]

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.

[stardiviner]           <Hack this world!>      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]           <Hack this world!>      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 <ndokos@gmail.com> wrote:
>
>> stardiviner <numbchild@gmail.com> 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
>>
>>
>>
>

[-- Attachment #2: Type: text/html, Size: 3561 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: ob-haskell evaluation needs inf-haskell but it does not exist
  2017-11-15 13:19     ` numbchild
@ 2017-11-15 15:35       ` Nick Dokos
  2017-11-17 16:16         ` numbchild
  0 siblings, 1 reply; 6+ messages in thread
From: Nick Dokos @ 2017-11-15 15:35 UTC (permalink / raw)
  To: emacs-orgmode

"numbchild@gmail.com" <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]           <Hack this world!>      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]           <Hack this world!>      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 <ndokos@gmail.com> wrote:
>    
>         stardiviner <numbchild@gmail.com> 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: ob-haskell evaluation needs inf-haskell but it does not exist
  2017-11-15 15:35       ` Nick Dokos
@ 2017-11-17 16:16         ` numbchild
  0 siblings, 0 replies; 6+ messages in thread
From: numbchild @ 2017-11-17 16:16 UTC (permalink / raw)
  To: Nick Dokos; +Cc: Org-mode

[-- Attachment #1: Type: text/plain, Size: 3408 bytes --]

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) #<bytecode 0x244f2f9>)("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]           <Hack this world!>      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 <ndokos@gmail.com> wrote:

> "numbchild@gmail.com" <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]           <Hack this world!>      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]           <Hack this world!>      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 <ndokos@gmail.com>
> wrote:
> >
> >         stardiviner <numbchild@gmail.com> 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
>
>
>

[-- Attachment #2: Type: text/html, Size: 5995 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-11-17 16:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-12  6:30 ob-haskell evaluation needs inf-haskell but it does not exist stardiviner
2017-11-13 15:43 ` Nick Dokos
2017-11-15 13:17   ` numbchild
2017-11-15 13:19     ` numbchild
2017-11-15 15:35       ` Nick Dokos
2017-11-17 16:16         ` numbchild

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).