emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Thomas S. Dye" <tsd@tsdye.online>
To: Ihor Radchenko <yantar92@posteo.net>
Cc: "Thomas S. Dye" <tsd@tsdye.online>,
	emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: Haskell code blocks
Date: Tue, 18 Oct 2022 17:50:30 -1000	[thread overview]
Message-ID: <878rlcqxcn.fsf@tsdye.online> (raw)
In-Reply-To: <87tu40cyo5.fsf@localhost>

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 was hoping someone had a 
solution to the Prelude> problem.  I'm not sure when I might get 
back to this.

All the best,
Tom

Ihor Radchenko <yantar92@posteo.net> writes:

> "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.


-- 
Thomas S. Dye
https://tsdye.online/tsdye


  reply	other threads:[~2022-10-19  4:01 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-03  1:16 Haskell code blocks Thomas S. Dye
2022-10-19  2:52 ` Ihor Radchenko
2022-10-19  3:50   ` Thomas S. Dye [this message]
2022-10-19  4:22     ` Ihor Radchenko
2022-10-19  4:47       ` Thomas S. Dye
2022-10-19 10:17         ` Ihor Radchenko
2022-10-19 18:03           ` Bruno Barbier
     [not found]           ` <notmuch-sha1-431220eef964237e131dcf36f817756f3537caf1>
2022-10-21  3:10             ` Ihor Radchenko
2022-11-07  7:24             ` Ihor Radchenko
2022-11-08 18:46               ` Bruno Barbier
2022-11-09  2:54                 ` Ihor Radchenko
2023-03-13 11:38                 ` Ihor Radchenko
2023-03-15 18:12                   ` Bruno Barbier
     [not found]                   ` <notmuch-sha1-86fc4270780c1f4b2624b20be5d3684ddf44d9c0>
2023-03-19  9:20                     ` Bruno Barbier
2022-10-22  5:06 ` Jarmo Hurri

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878rlcqxcn.fsf@tsdye.online \
    --to=tsd@tsdye.online \
    --cc=emacs-orgmode@gnu.org \
    --cc=yantar92@posteo.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).