From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Roland Coeurjoly Newsgroups: gmane.emacs.bugs Subject: bug#40852: Support compilation of Haskell in org mode babel blocks. Date: Mon, 26 Oct 2020 21:18:15 +0100 Message-ID: References: <87k0wc7x7s.fsf@gnus.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000017d19305b298a290" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14147"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 40852@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Oct 26 21:37:58 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kX9Fa-0003UK-TZ for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 26 Oct 2020 21:37:55 +0100 Original-Received: from localhost ([::1]:46394 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kX9FZ-0005Qu-Tx for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 26 Oct 2020 16:37:53 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41998) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kX8xK-0006n7-Sy for bug-gnu-emacs@gnu.org; Mon, 26 Oct 2020 16:19:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58221) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kX8xK-0007p8-Gy for bug-gnu-emacs@gnu.org; Mon, 26 Oct 2020 16:19:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kX8xK-0002rc-C1 for bug-gnu-emacs@gnu.org; Mon, 26 Oct 2020 16:19:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Roland Coeurjoly Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 26 Oct 2020 20:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40852 X-GNU-PR-Package: emacs Original-Received: via spool by 40852-submit@debbugs.gnu.org id=B40852.160374351610977 (code B ref 40852); Mon, 26 Oct 2020 20:19:02 +0000 Original-Received: (at 40852) by debbugs.gnu.org; 26 Oct 2020 20:18:36 +0000 Original-Received: from localhost ([127.0.0.1]:41534 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kX8wt-0002qy-Hy for submit@debbugs.gnu.org; Mon, 26 Oct 2020 16:18:35 -0400 Original-Received: from mail-ot1-f43.google.com ([209.85.210.43]:45912) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kX8wr-0002ql-Gt for 40852@debbugs.gnu.org; Mon, 26 Oct 2020 16:18:34 -0400 Original-Received: by mail-ot1-f43.google.com with SMTP id f37so9165957otf.12 for <40852@debbugs.gnu.org>; Mon, 26 Oct 2020 13:18:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=DWd0JwkubZ60TfWvWJ9lCTJqFDlLg/f6c9n8w8oHFTk=; b=eP3qGahJrgg24BsYebP1Hc/pyDnx6yMbLP+ho6Y6mwCx/CRPT+hSH5XOXMRQBbjYLG Y514Cdr+vgVv7W6iePglUgIyvc6MiUz+IZ0lHd+/W+DqOWs7W8Uq2EXtb0qFziL5OGPs kWlKF6NzasBnL6T10F/F0Ovsja6eOG6GkGN/HKiOCQ5MuG53kub+MKEHUR/xZx0GqlCx 7QKjlI/poDAAwY1aRltB8mgOyQXFjewYYieVn01/YLqNJ+Yap+3892E3US4N4EtTaERg JyVkQ0uguN1KJzi3Dp9A9rXgMlaBi7ulJpb7oa1KZLYpg3PnSnOqCUmJE4Sl+3mO9llk 3fAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=DWd0JwkubZ60TfWvWJ9lCTJqFDlLg/f6c9n8w8oHFTk=; b=X+WQnac/s8OSA+QXHmfPjGZiW26wnBa8kTscrMEOJqZbVv/QJ+GfHdIM4Onrns+J2v RQtJDuPX6gAzhB5tlqEOV792etA+HFDnwZCVUW6kp+nPpGsZMWhiwoT/YoyZ0J7WWPDC nfM46FKbqBLtec/a6CHG+1Omi+TwB+bwiwn5GpzAncyq1701qF3L/vcKtfBtQT+eNBf9 KsipEhlrd4RmLs3ctrzK3n+9E2JmD873lQlmyWYZQP797TO8eaUImp4g+m2gew1tHuCp epWP3zFR9PNFh9oGIuLOyq9eEeW433l8dkIkNVJlwZrMejy6Y14IP+jh7klQj5oKNNQR XFSA== X-Gm-Message-State: AOAM533g2ksaGYtAZrQ3H4goYKBVEUpN1AxUTw9dPOZusxt2R0Q4catV YAj04RegX6H/ff3Ljb7xXM4bQ2Myve2wKs0W9/jhZE1ljms= X-Google-Smtp-Source: ABdhPJxKynNEhN+KtDqhHeOV34dp+eMnTYz3cE4wXsxfrE+TtUe6SUZ3EwskUAFaxBdD7ccIEYi3DhLi0FGtyJHBHak= X-Received: by 2002:a9d:7f12:: with SMTP id j18mr16279969otq.304.1603743507794; Mon, 26 Oct 2020 13:18:27 -0700 (PDT) In-Reply-To: <87k0wc7x7s.fsf@gnus.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:191653 Archived-At: --00000000000017d19305b298a290 Content-Type: text/plain; charset="UTF-8" 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 wrote: > Roland Coeurjoly 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 > --00000000000017d19305b298a290 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I figured out a better forum would be the org mode ma= iling list, so I sent the patch there and got merged.

<= div>= https://orgmode.org/list/877dx0cwhz.fsf@nicolasgoaziou.fr/
<= br>
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 interpret= ed (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.=C2=A0 For example, in ghci (the interpreter) y= ou
> are required to use let to declare functions.
>
> In this patch I add support for compilation with the header argument > :compile yes.=C2=A0 The function to compile haskell is almost a copy p= aste
> 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.=C2=A0 :-/=C2=A0 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<= br> Schulte, who wrote ob-haskell, doesn't seem to have contributed in a decade...

--
(domestic pets only, the antidote for overdose, milk.)
=C2=A0 =C2=A0bloggy blog: http://lars.ingebrigtsen.no
--00000000000017d19305b298a290--