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 GPDiGaOZwV4LagAA0tVLHw (envelope-from ) for ; Sun, 17 May 2020 20:08:03 +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 MLfuFaOZwV7RdgAAB5/wlQ (envelope-from ) for ; Sun, 17 May 2020 20:08:03 +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 E1561940275 for ; Sun, 17 May 2020 20:08:02 +0000 (UTC) Received: from localhost ([::1]:43952 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jaPZp-00013e-PL for larch@yhetil.org; Sun, 17 May 2020 16:08:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51480) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jaPZV-00013V-8g for emacs-orgmode@gnu.org; Sun, 17 May 2020 16:07:41 -0400 Received: from mail-io1-xd41.google.com ([2607:f8b0:4864:20::d41]:45409) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jaPZU-0004NS-G3 for emacs-orgmode@gnu.org; Sun, 17 May 2020 16:07:40 -0400 Received: by mail-io1-xd41.google.com with SMTP id w25so8366536iol.12 for ; Sun, 17 May 2020 13:07:40 -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; bh=jo4WzcbWfNNcw8WhHlIZSToXjYX9FVy59Udi9VszI4M=; b=JeQdM0vPp2lI23xdvGhoGE/mGWAV98oLfcjt/pjGfl0xq3w50nnyBBnvSbZce4YsEV GW1IOU9BHc91onqGzcXZ81KhhrXDi5P66SubVABX/8gyf5g5WEna67x6hRh2Ee3BKqSA BGS1v/JboeQ+evxUnkdKhZz3ligKN3LWdIvdozswKJORL9c5pNWMlW5agNTdE7KdEazE cKgqFfrlZ8RJIdO0eU+/ljHXYRgWAbKSB44sqd0eslc3DTET8osm4dxMtM3pkOYpJtT7 nuZAp87XLMeYejPFkC7JWe4NPVp4+5zaNm9hIz4LGxt1REN3IRJalDYq8tWhQ4cPQnjD aRQQ== 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; bh=jo4WzcbWfNNcw8WhHlIZSToXjYX9FVy59Udi9VszI4M=; b=GmPDEKGYtLcZTHFAr4M5NLpfvxa/AUStSDwrjP4iasY3MuwZmkY04z7cnKd/A10FsO NREmlXtRrCtdesz8EDmRn4EOxTydViZGFqaHRAYITE1jftjQRJq1sKsVwi/Tx3tOI8gy 0eP8Royy9bEDVVlk4W0j/Kvc1dX2Km5GoV3dEXvQeldG4dWQmL9FKXHlWmkML0elJv4k PTaDH2LUrEu/t+61M/mEuEReJB4/vuxGqZp9ELzncpJQI3TK6O2SGrW65laPUlT/gjFk OSlnqGAc04/VL7ODcT0L8YZ/iIgO38mH/mmkCfi6xSk9zzi5uCl3se8da10SXVwmWGPP bpYA== X-Gm-Message-State: AOAM530RxWJDiRKIxhPNzbXzZ/TaEBADe+vaGmAbxHv7Ct3pzZWPfAxK hb4narkugzeNsDosNcpM8+bHeo7r6wKhW1HLl8x+8lY7 X-Google-Smtp-Source: ABdhPJwFdJOi+CfY2eQvdItMY8FM2rcLuB7WTWBjYqoq1i/WYthImlbiWhIhjkcqC4eJm9EqdG3fvxdw5k9tEWzNAV4= X-Received: by 2002:a02:b88e:: with SMTP id p14mr12241939jam.36.1589746059184; Sun, 17 May 2020 13:07:39 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Nick Daly Date: Sun, 17 May 2020 15:07:27 -0500 Message-ID: Subject: Re: [PATCH] ob-haskell: Line Continuations Mangle Block Output To: Org Mode Content-Type: multipart/mixed; boundary="000000000000243e5d05a5dd9984" Received-SPF: pass client-ip=2607:f8b0:4864:20::d41; envelope-from=nick.m.daly@gmail.com; helo=mail-io1-xd41.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001 autolearn=_AUTOLEARN 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-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=JeQdM0vP; 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-Spam-Score: -0.61 X-TUID: pa18kPpuMk/F --000000000000243e5d05a5dd9984 Content-Type: text/plain; charset="UTF-8" Hi Org Maintainers, Attached is an updated patch that makes output trimming work with blocks that do and don't produce results. The old patch creates a =let: Wrong type argument: arrayp, nil= error when evaluating blocks that don't produce output. This necessarily incorporates yesterday's patch. Thanks for your time, Nick Multi-line function declarations with output still work fine. #+BEGIN_SRC haskell :{ chain :: (Integral a) => a -> [a] chain 1 = [1] chain n | even n = n:chain (n `div` 2) | odd n = n:chain (n*3 + 1) :} chain 10 #+END_SRC #+RESULTS: | 10 | 5 | 16 | 8 | 4 | 2 | 1 | Silent declaration-only blocks correctly evaluate silently. #+BEGIN_SRC haskell :results silent :{ flip' :: (a -> b -> c) -> (b -> a -> c) flip' f = \x y -> f y x :} #+END_SRC Single-line function calls also return the expected results. #+name: flip'-hello #+BEGIN_SRC haskell flip' zip [1,2,3,4,5,6] "hello" #+END_SRC #+RESULTS: flip'-hello | h | 1 | | e | 2 | | l | 3 | | l | 4 | | o | 5 | --000000000000243e5d05a5dd9984 Content-Type: text/x-patch; charset="US-ASCII"; name="ob-haskell-trim-prelude-2.diff" Content-Disposition: attachment; filename="ob-haskell-trim-prelude-2.diff" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_kabhploz0 ZGlmZiAtLWdpdCBhL2xpc3Avb2ItaGFza2VsbC5lbCBiL2xpc3Avb2ItaGFza2VsbC5lbAppbmRl eCBiZWExNjI1MjguLmNiNTgxZmUzYiAxMDA2NDQKLS0tIGEvbGlzcC9vYi1oYXNrZWxsLmVsCisr KyBiL2xpc3Avb2ItaGFza2VsbC5lbApAQCAtODMsMTIgKzgzLDE2IEBACiAJCQkgIChjZHIgKG1l bWJlciBvcmctYmFiZWwtaGFza2VsbC1lb2UKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIChyZXZlcnNlIChtYXBjYXIgIydvcmctdHJpbSByYXcpKSkpKSkpCiAgICAgKG9y Zy1iYWJlbC1yZWFzc2VtYmxlLXRhYmxlCi0gICAgIChsZXQgKChyZXN1bHQKKyAgICAgKGxldCog KChyZXN1bHQKICAgICAgICAgICAgIChwY2FzZSByZXN1bHQtdHlwZQogICAgICAgICAgICAgICAo YG91dHB1dCAobWFwY29uY2F0ICMnaWRlbnRpdHkgKHJldmVyc2UgcmVzdWx0cykgIlxuIikpCi0g ICAgICAgICAgICAgIChgdmFsdWUgKGNhciByZXN1bHRzKSkpKSkKKyAgICAgICAgICAgICAgKGB2 YWx1ZSAoY2FyIHJlc3VsdHMpKSkpCisgICAgICAgICAgICAocmVzdWx0CisgICAgICAgICAgICAg KGlmIChzdHJpbmdwIHJlc3VsdCkKKyAgICAgICAgICAgICAgICAgKHJlcGxhY2UtcmVnZXhwLWlu LXN0cmluZyAiUHJlbHVkZVt8Pl0gIiAiIiByZXN1bHQpCisgICAgICAgICAgICAgICByZXN1bHQp KSkKICAgICAgICAob3JnLWJhYmVsLXJlc3VsdC1jb25kIChjZHIgKGFzc3EgOnJlc3VsdC1wYXJh bXMgcGFyYW1zKSkKLQkgcmVzdWx0IChvcmctYmFiZWwtc2NyaXB0LWVzY2FwZSByZXN1bHQpKSkK KwkgcmVzdWx0IChpZiAoc3RyaW5ncCByZXN1bHQpIChvcmctYmFiZWwtc2NyaXB0LWVzY2FwZSBy ZXN1bHQpKSkpCiAgICAgIChvcmctYmFiZWwtcGljay1uYW1lIChjZHIgKGFzc3EgOmNvbG5hbWUt bmFtZXMgcGFyYW1zKSkKIAkJCSAgKGNkciAoYXNzcSA6Y29sbmFtZS1uYW1lcyBwYXJhbXMpKSkK ICAgICAgKG9yZy1iYWJlbC1waWNrLW5hbWUgKGNkciAoYXNzcSA6cm93bmFtZS1uYW1lcyBwYXJh bXMpKQo= --000000000000243e5d05a5dd9984--