GNU bug report logs - #40852
Support compilation of Haskell in org mode babel blocks.

Previous Next

Package: emacs;

Reported by: Roland Coeurjoly <rolandcoeurjoly <at> gmail.com>

Date: Sat, 25 Apr 2020 19:05:02 UTC

Severity: normal

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Roland Coeurjoly <rolandcoeurjoly <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Support compilation of Haskell in org mode babel blocks.
Date: Sat, 25 Apr 2020 21:04:03 +0200
[Message part 1 (text/plain, inline)]
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
<https://stackoverflow.com/questions/28927716/org-babel-for-haskell-not-works-of-eval-haskell-block/40920873>
.

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.
[Message part 2 (text/html, inline)]
[0001-Add-Haskell-specific-header-argument-compile-to-comp.patch (text/x-patch, attachment)]

This bug report was last modified 4 years and 209 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.