bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#40852: Support compilation of Haskell in org mode babel blocks.


From: Roland Coeurjoly
Subject: bug#40852: Support compilation of Haskell in org mode babel blocks.
Date: Mon, 26 Oct 2020 21:18:15 +0100

I figured out a better forum would be the org mode mailing list, so I sent the patch there and got merged.

https://orgmode.org/list/877dx0cwhz.fsf@nicolasgoaziou.fr/

On Wed, Sep 30, 2020 at 5:35 AM Lars Ingebrigtsen <larsi@gnus.org> wrote:
Roland Coeurjoly <rolandcoeurjoly@gmail.com> writes:

> Haskell code can be both compiled (for example with ghc), or interpreted (with
> ghci).
>
> Until now, org babel had only support for interpretation.
>
> Haskell is weird in that some code for the interpreter cannot be
> compiled and viceversa.  For example, in ghci (the interpreter) you
> are required to use let to declare functions.
>
> In this patch I add support for compilation with the header argument
> :compile yes.  The function to compile haskell is almost a copy paste
> of the C funcion in ob-C.el.
>
> By default I retain the original behavior, i.e. interpreting the block.
>
> I have tested this patch in emacs-27.0.91.
>
> It is my first patch to GNU Emacs and I am a newbie with both elisp
> and haskell.

There was unfortunately no response to this patch at the time (in April
this year), because, I guess, not that many people have knowledge of
both Org and Haskell.  :-/  Me included.

The code looks reasonable to me, but I have no way of testing.

I'm not quite sure who I should direct attention to this patch -- Eric
Schulte, who wrote ob-haskell, doesn't seem to have contributed in a
decade...

--
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no

reply via email to

[Prev in Thread] Current Thread [Next in Thread]