Re: [PATCH] Update ob-haskell from deprecated inf-haskell-mode to haskell-interactive-mode

2020-07-26 Thread Kyle Meyer
Seth Lee writes:

> Issue: compiling code in a source block that had an infinite list that
> would evaluate in the ghci.  All code, even with `:compile` flag set
> would be run in ghci.
>
> Updating deprecated `inf-haskell-mode` to `haskell-interactive-mode`
> solves the issue for me.
>
> Source blocks flagged to compile will compile in a temp file, and
> those flagged otherwise will be run interactively. This is the
> intended behaviour.
>
> Patch attached.

Thanks for the patch.

> Subject: [PATCH] ob-haskell.el: Update deprecated functions
>
> * lisp/ob-haskell.el: Update to haskell-interactive-mode from inf-haskell-mode
>
> Deprecated commands from inf-haskell mode would send source blocks
> flagged to compile to the interpreter instead of compiling in a temp
> file.
>
> TINYCHANGE

I admit that I don't really have a good understanding of the situation
but...

> ---
>  lisp/ob-haskell.el | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/lisp/ob-haskell.el b/lisp/ob-haskell.el
> index 84e2d6c42..01d658615 100644
> --- a/lisp/ob-haskell.el
> +++ b/lisp/ob-haskell.el
> @@ -43,9 +43,9 @@
>  (require 'comint)
>  
>  (declare-function haskell-mode "ext:haskell-mode" ())
> -(declare-function run-haskell "ext:inf-haskell" ( arg))
> +(declare-function run-haskell "ext:haskell-interactive-mode" ( arg))
>  (declare-function inferior-haskell-load-file
> -   "ext:inf-haskell" ( reload))
> +   "ext:haskell-process-load-file" ( reload))
>  (declare-function org-entry-get "org" (pom property  inherit 
> literal-nil))

... I'm confused that the patch consists solely of modifying
declare-function calls.  While that can appease the Emacs byte-compiler,
I'm not seeing how it could relate to the problem you describe.



[PATCH] Update ob-haskell from deprecated inf-haskell-mode to haskell-interactive-mode

2020-07-14 Thread Seth Lee
Hello, I've made a patch for `ob-haskell.el`.
I'm not really an elisper, but I made a patch that seems to work on my machine.

Issue: compiling code in a source block that had an infinite list that would 
evaluate in the ghci.
All code, even with `:compile` flag set would be run in ghci.

Updating deprecated `inf-haskell-mode` to `haskell-interactive-mode` solves the 
issue for me.

Source blocks flagged to compile will compile in a temp file, and those flagged 
otherwise will be run interactively. This is the intended behaviour.

Patch attached.

0001-ob-haskell.el-Update-deprecated-functions.patch
Description: Binary data