Re: Haskell code blocks

2023-03-19 Thread Bruno Barbier
Hi Ihor, >> Bruno Barbier writes: >> >>> Sorry, I'm still working on adding a 'test-ob-haskell.el', when I have >>> some spare time, but I'm unable so far to find tests that I can't >>> reliably break. FTR: I've opened a new thread, with a patch containing tests: https://lists.gnu.org/arc

Re: Haskell code blocks

2023-03-15 Thread Bruno Barbier
Hi Ihor, Ihor Radchenko writes: > Bruno Barbier writes: > >> Sorry, I'm still working on adding a 'test-ob-haskell.el', when I have >> some spare time, but I'm unable so far to find tests that I can't >> reliably break. > > May I know if you are still working on this? > Do you need any help?

Re: Haskell code blocks

2023-03-13 Thread Ihor Radchenko
Bruno Barbier writes: > Sorry, I'm still working on adding a 'test-ob-haskell.el', when I have > some spare time, but I'm unable so far to find tests that I can't > reliably break. May I know if you are still working on this? Do you need any help? -- Ihor Radchenko // yantar92, Org mode contri

Re: Haskell code blocks

2022-11-08 Thread Ihor Radchenko
Bruno Barbier writes: > Sorry, I'm still working on adding a 'test-ob-haskell.el', when I have > some spare time, but I'm unable so far to find tests that I can't > reliably break. > > I'll open a new thread when I think my 'test-ob-haskell.el' is worth > reviewing. Thanks for continued work on

Re: Haskell code blocks

2022-11-08 Thread Bruno Barbier
Ihor Radchenko writes: > Applied onto main. > https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=0de063a52181bd96ac9bf023454781f07c3353b3 Thanks Ihor. Sorry, I'm still working on adding a 'test-ob-haskell.el', when I have some spare time, but I'm unable so far to find tests that I

Re: Haskell code blocks

2022-11-06 Thread Ihor Radchenko
Bruno Barbier writes: > I've attached the patch that I've used to fix ob-haskell. Applied onto main. https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=0de063a52181bd96ac9bf023454781f07c3353b3 -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at

Re: Org Haskell code blocks

2022-10-26 Thread Ihor Radchenko
Dominik Schrempf writes: > This is interesting. For me, syntax highlighting works partially. For > example, keywords are highlighted, but function names are not. See below. I confirm the issue with your example. It is a known problem with indentation-sensitive languages. The problem is that org

Re: Org Haskell code blocks

2022-10-26 Thread Dominik Schrempf
Ihor Radchenko writes: > Dominik Schrempf writes: > >> Syntax highlighting is not working, for example, with the following >> snippet and code block: >> >> begin_snippet >> >> - An example of a function: >> >> #+begin_src haskell :exports code :results none >> f :: a -> b >> #+end_src >>

Re: Org Haskell code blocks

2022-10-25 Thread Ihor Radchenko
Dominik Schrempf writes: > Syntax highlighting is not working, for example, with the following > snippet and code block: > > begin_snippet > > - An example of a function: > > #+begin_src haskell :exports code :results none > f :: a -> b > #+end_src > > end_snippet Works on my side (I think

Re: Org Haskell code blocks

2022-10-25 Thread Dominik Schrempf
Dear Ihor, thank you, these are great news! Syntax highlighting is not working, for example, with the following snippet and code block: begin_snippet - An example of a function: #+begin_src haskell :exports code :results none f :: a -> b #+end_src end_snippet Note the indentation. The

Re: Org Haskell code blocks

2022-10-25 Thread Ihor Radchenko
Dominik Schrempf writes: > Ad scrambling: The scrambling happens with multi-line input. For example > > #+begin_src haskell :exports both :results output > let x = 10 > let y = 12 > x*y > [x,y] > #+end_src > > #+results: > : > : ghci> 120 > : [10,12] I am

Re: Org Haskell code blocks

2022-10-25 Thread Dominik Schrempf
Hi Bruno, glad to hear that it works for you. Ad 'org-babel-script-escape': I use Org version 9.6. I do not temper with 'org-babel-script-escape', it is used by the respective babel modules --- 'ob-haskell' in this case. The error also occurs with 'cabal-repl' as process type. Ad 'haskell-proc

Re: Org Haskell code blocks

2022-10-25 Thread Bruno Barbier
Hi, Dominik Schrempf writes: > ... > However, the result output is still scrambled (e.g., empty > lines, unnecessary "ghci>" prompts in results) > For me, ghci is selected by default. Here is the config I've used to test it: | emacs-version |28.1 | | org-version

Re: Org Haskell code blocks

2022-10-25 Thread Dominik Schrempf
rempf writes: > Hello, > > I have trouble using Haskell code blocks in Org Mode. > > 1. I need to use the following Org Mode file header: > > #+property: :header-args:haskell: :prologue ":{\n" :epilogue ":}\n" > > #+begin_src haskell :exports none :res

Org Haskell code blocks

2022-10-25 Thread Dominik Schrempf
Hello, I have trouble using Haskell code blocks in Org Mode. 1. I need to use the following Org Mode file header: #+property: :header-args:haskell: :prologue ":{\n" :epilogue ":}\n" #+begin_src haskell :exports none :results none :set prompt-cont "" #+end_src Oth

Re: Haskell code blocks

2022-10-21 Thread Jarmo Hurri
Greetings Thomas. "Thomas S. Dye" writes: > I'm struggling to write a minimal ob-doc-haskell.org for Worg. > > The obligatory Hello World! example yields bad results. > > #+name: haskell-hello-world > #+begin_src haskell > > main :: IO () > main = putStrLn "Hello, World!" > main > #+end_src

Re: Haskell code blocks

2022-10-20 Thread Ihor Radchenko
Bruno Barbier writes: > I've attached the patch that I've used to fix ob-haskell. > > Should I submit a patch for ob-haskell ? > > Bruno > > > From f2e91a62469e84ce1d3036216ae3eca4084f3b94 Mon Sep 17 00:00:00 2001 > From: Bruno BARBIER > Date: Wed, 19 Oct 2022 19:44:42 +0200 > Subject: [PATCH] o

Re: Haskell code blocks

2022-10-19 Thread Bruno Barbier
Hi Thomas, Ihor, I'm not currently using ob-haskell, but I do have a version of GHC. As I may use ob-haskell one day, I decided to take a look. Here are the versions I'm using: #+begin_src elisp (list (list "emacs" emacs-version) (list "org" org-version) (list "g

Re: Haskell code blocks

2022-10-19 Thread Ihor Radchenko
"Thomas S. Dye" writes: >> To clarify, it looks like Prelude Emacs is doing something wrong >> here. >> Something that breaks haskell-mode and consequently ob-haskell. > > I'm using Spacemacs. Prelude is a standard module in Haskell. I > thought that might be the source. Thanks for the extra

Re: Haskell code blocks

2022-10-18 Thread Thomas S. Dye
Ihor Radchenko writes: "Thomas S. Dye" writes: Thanks Ihor. I don't actually use Haskell. Earlier this year I attempted to complete the Org Babel language documents on Worg, but couldn't get the obligatory "hello world" code block to behave in Haskell. I'm guessing that ob-haskell.e

Re: Haskell code blocks

2022-10-18 Thread Ihor Radchenko
"Thomas S. Dye" writes: > Thanks Ihor. I don't actually use Haskell. Earlier this year I > attempted to complete the Org Babel language documents on Worg, > but couldn't get the obligatory "hello world" code block to behave > in Haskell. I'm guessing that ob-haskell.el actually works for >

Re: Haskell code blocks

2022-10-18 Thread Thomas S. Dye
Thanks Ihor. I don't actually use Haskell. Earlier this year I attempted to complete the Org Babel language documents on Worg, but couldn't get the obligatory "hello world" code block to behave in Haskell. I'm guessing that ob-haskell.el actually works for experienced Haskell programmers and

Re: Haskell code blocks

2022-10-18 Thread Ihor Radchenko
"Thomas S. Dye" writes: > I'm struggling to write a minimal ob-doc-haskell.org for Worg. > > I installed Haskell via Spacemacs (development branch) and the > Haskell installation appears to be functioning correctly. > > The obligatory Hello World! example yields bad results. > > #+name: haskell-

Haskell code blocks

2022-01-02 Thread Thomas S. Dye
Aloha all, Happy New Year! I'm struggling to write a minimal ob-doc-haskell.org for Worg. I installed Haskell via Spacemacs (development branch) and the Haskell installation appears to be functioning correctly. The obligatory Hello World! example yields bad results. #+name: haskell-hello-wo