From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id APwLDFTp8F/RXAAA0tVLHw (envelope-from ) for ; Sat, 02 Jan 2021 21:44:52 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id 0GbVB1Tp8F9jDwAAB5/wlQ (envelope-from ) for ; Sat, 02 Jan 2021 21:44:52 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 99E1F940105 for ; Sat, 2 Jan 2021 21:44:51 +0000 (UTC) Received: from localhost ([::1]:50208 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kvohd-0008BH-8W for larch@yhetil.org; Sat, 02 Jan 2021 16:44:49 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:46828) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kvohG-0008B8-Rd for emacs-orgmode@gnu.org; Sat, 02 Jan 2021 16:44:26 -0500 Received: from mail-ed1-x52a.google.com ([2a00:1450:4864:20::52a]:33809) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kvohE-0008IP-VH for emacs-orgmode@gnu.org; Sat, 02 Jan 2021 16:44:26 -0500 Received: by mail-ed1-x52a.google.com with SMTP id dk8so23133495edb.1 for ; Sat, 02 Jan 2021 13:44:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=OYfzsQcCeQRLxOqjf21hClTJyTQexsKA70u8YnYraSM=; b=a40TsILjNT27sWQJgLTaBdU+0QpBeo+75AiS0Tqmsokn8awwRlsPn6ayYuwBoadMhL aeUMN9sUtUWDyNvb+pTlxrf87Hh2p/HTony7SugD65krSSERk3lX0b8/Equ47O4eE8uV rAS3+uHCxnCgxucRF4mO6khCpfV7jjayppbSkvmkMnL14SPtYuJzRILXL+160JCneqMq GIWeu77riVkHZWasfZQmD/iaDxCpLVIjrebXuWeukIv+GmNvpnSnsunZSkCSpBkp7Ggq /kdQKQNMpFPevclkZMzi5Z+biXv3RarG522t6zz0wljFeIByStqR+qjYCSMn4j6iCbdj vQTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=OYfzsQcCeQRLxOqjf21hClTJyTQexsKA70u8YnYraSM=; b=KcIu8tscbV5HQxwaAv1T/VK0Rk3Gyda9zhbFiymcbZb2VZf0y1BzOEqCB6AcgAct6C MIQ/GuFev0xJh6emBXoqkQZ9hq/qVnjg+ZmcY75A1Jmdd1QhzaFuezttQFyECllKsNz+ slyoTa/6wFWpoxzvHPzpu8JiVap/NNhrv1VG6a18u+NQ2iNmqQbxki29MP+d6HkKB/Sp uJlyAC3fKTbyGd1ct2KTPOWqyHA6oRCxESxgX0nIl/jVQ0YmyXiRH50CssMIqiPV290r gCO0U/U4nHjW+1DGKXdyekkqU2WhCWouJigjZgq6LsGjgSR+wK3FISws6J02cLgx1wm4 qIjA== X-Gm-Message-State: AOAM530bJRHUEzvIx7eFJ/93ofvHAswslPYqvPCLdUGhU3YzlKjiGymm thTFdGbIWDU1+6Kan9nrGRKBNLEIF+GUnQX3SkTiyYIQESsp2w== X-Google-Smtp-Source: ABdhPJxPUZqs1624Xj36VaCA8TP4EH1rCichhaugTmiTyved6fZjCsf35s27DrQQX1Zl1s+/QKgwZP3Qvvtu65+LTf0= X-Received: by 2002:a50:bf4a:: with SMTP id g10mr63464258edk.201.1609623862759; Sat, 02 Jan 2021 13:44:22 -0800 (PST) MIME-Version: 1.0 From: Lawrence Bottorff Date: Sat, 2 Jan 2021 15:44:11 -0600 Message-ID: Subject: ob-haskell To: emacs-orgmode Mailinglist Content-Type: multipart/alternative; boundary="0000000000008fd29505b7f1c27a" Received-SPF: pass client-ip=2a00:1450:4864:20::52a; envelope-from=borgauf@gmail.com; helo=mail-ed1-x52a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -1.53 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=a40TsILj; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 99E1F940105 X-Spam-Score: -1.53 X-Migadu-Scanner: scn1.migadu.com X-TUID: M12Akgq/dTXM --0000000000008fd29505b7f1c27a Content-Type: text/plain; charset="UTF-8" I recently wimped out of trying to update ob-haskell as an official maintainer, but I'd eventually like to get back to it -- *after *I get some base understanding of what Haskell is (Zeno's paradox-land?) and how the ghci works. Basically, the ghci is what it is -- tautological, but true. And that means when ob-haskell does nothing but dump the contents of a babel code block into ghci, it's no better than if the user had typed in into the REPL line-by-line. A quick run-down: :set +m supposedly alerts ghci that a multi-line expression is coming, will come; but typically, it doesn't infer this very well. Enclosing code in :{ ... :} is fairly good -- again you can type this in at the REPL prompt and see how it works -- however, there are gotchas. a plain block: #+begin_src haskell ...code... #+end_src is okay when you only have a one-liner to evaluate. But again, ob-haskell seems to do nothing but take the block contents and dump it to the ghci REPL as though the user had typed it in line-by-line, Enter, Enter... What would be nice is if a C-c C-c inside a block could somehow act as though the ghci were being sent a regular *.hs buffer in haskell-mode -- and that, of course, cumulatively. C-' creates a decent haskell-mode environment, BTW, so some form of a babel block to haskell-mode connection does exist.... So am I on the right track? It's obvious at this point raw dumps into the REPL aren't optimal, i.e., are fraught. What is, e.g., geiser&Scheme doing that ob-haskell isn't? LB PS: Eventually, I'll try to glean some hints from the Jupyter Haskell effort. PPS: GHCI User's Guide doesn't really tell me anything other than yes, ob-haskell is raw-dumping into an environment that isn't designed to play nice with babel. --0000000000008fd29505b7f1c27a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I recently wimped out of trying to update ob-haskell as an= official maintainer, but I'd eventually like to get back to it -- a= fter I get some base understanding of what Haskell is (Zeno's parad= ox-land?) and how the ghci works. Basically, the ghci is what it is -- taut= ological, but true. And that means when ob-haskell does nothing but dump th= e contents of a babel code block into ghci, it's no better than if the = user had typed in into the REPL line-by-line. A quick run-down:

:set=C2=A0+m supposedly alerts ghci that a multi-line expression is= coming, will come; but typically, it doesn't infer this very well.

Enclosing code in :{ ... :} is fairly good -- again y= ou can type this in at the REPL prompt and see how it works -- however, the= re are gotchas.

a plain block:

#+begin_src haskell
...code...
#+end_src

is okay when you only have a one-liner to evaluate. But again, ob-ha= skell seems to do nothing but take the block contents and dump it to the gh= ci REPL as though the user had typed it in line-by-line, Enter, Enter...

What would be nice is if a C-c C-c inside a block co= uld somehow act as though the ghci were being sent a regular=C2=A0 *.hs buf= fer in haskell-mode -- and that, of course, cumulatively. C-' creates a= decent haskell-mode environment, BTW, so some form of a babel block to has= kell-mode connection does exist....

So am I on the= right track? It's obvious at this point raw dumps into the REPL aren&#= 39;t optimal, i.e., are fraught. What is, e.g., geiser&Scheme doing tha= t ob-haskell isn't?

LB

PS: Eventually, I'll try to glean some hints from the Jupyter Haskell effort.
PPS:=C2=A0GHCI User's Guide=C2=A0doesn'= t really tell me anything other than yes, ob-haskell is raw-dumping into an= environment that isn't designed to play nice with babel.
--0000000000008fd29505b7f1c27a--