[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Haskell code blocks
From: |
Ihor Radchenko |
Subject: |
Re: Haskell code blocks |
Date: |
Wed, 19 Oct 2022 02:52:42 +0000 |
"Thomas S. Dye" <tsd@tsdye.online> 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-hello-world
> #+begin_src haskell
> main :: IO ()
> main = putStrLn "Hello, World!"
> main
> #+end_src
>
> #+RESULTS: haskell-hello-world
> : Prelude> Hello, World!
>
> I'm guessing the "Prelude>" part of the output is the prompt from
> the interpreter.
>
> I found this in ob-haskell.el:
>
> (setq-local comint-prompt-regexp
> (concat haskell-prompt-regexp "\\|^λ?>
> "))))
>
> But I couldn't find a way to modify haskell-prompt-regexp without
> changing the source.
>
> Advice welcome.
I guess you can report this as a bug in Haskell-mode?
haskell-prompt-regexp is defined there.
If absolutely necessary and if you want that _your_ Haskell prompt is
different from Haskell-mode defaults, just setq haskell-prompt-regexp in
your config.
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
- Re: Haskell code blocks,
Ihor Radchenko <=