From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id gJo8K2tTEWTiMAEASxT56A (envelope-from ) for ; Wed, 15 Mar 2023 06:11:07 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id +GhBK2tTEWQ5XwAAauVa8A (envelope-from ) for ; Wed, 15 Mar 2023 06:11:07 +0100 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 39222135DD for ; Wed, 15 Mar 2023 06:11:07 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1678857067; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=oUBHGv8GmNd1N4rpPyswebXEVgcCbPba+2BMABp/e1A=; b=dkppuRm4fwjUmmuIPfDsMBjVxvjviSoq9hUiux5pFlSr3bbLgYtXfhFgo5lLk2ZcXee4rj WAkthqczxSlvMkcWvxVWzByNbWhnHyYB85aMtZFwKz1eXYiBFsDjEblxKcSp+geB6v4ExO ZwCi3TzuMedjEeibIdbCLikpQW5nvIT94thTzWCCfx7qhizFqY8Mr6yvBkYEFokWliaTLU NUB/bUuzHtaJedDAByzdrtt4SQiMNvRmpnTEstkqZ2P9FGzCQo71sLn9y6dkyHiYcdTLBw uJzLy6mj2eBMkQwWfYXIv4gAp6kbmA3VkoWJ1QrxevqrvIHFI4I9FbcLhtD/Dg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1678857067; a=rsa-sha256; cv=none; b=GjJuk/KvQAtHfc/0hU3sfrWCd23fUETOiwI7VUUbBFDR9DQVt+IkOxeexUy/bPeBExjAOK 7E3AprPTExAeuheXtiMqvl7x8xgRfvrDl5IfPkHvR5vZN4gOgpfVWL+buWtGHcsv09JWBs FfCScNiiyEQfv9MtDMqTrEbi9LlfnLHIuff2yntP9/TvM8aR7xhOIkBcoKaogdp4W/epSc 7tKe5KBaUAeFqs1Benx4TfpJv6w/HVkuKInSlu5gafmXym+QlRpVUlGEhCJgt/lPxO/s6y y8pq3zJnFnKqWZRxb02Vfzy9H7I1keUOnm8cy7es05/X0cdqZcNXRRkePXPpkg== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pcJOs-0006os-15; Wed, 15 Mar 2023 01:10:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pcJOp-0006oU-SH for emacs-orgmode@gnu.org; Wed, 15 Mar 2023 01:10:07 -0400 Received: from ciao.gmane.io ([116.202.254.214]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pcJOo-0005cb-63 for emacs-orgmode@gnu.org; Wed, 15 Mar 2023 01:10:07 -0400 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1pcJOk-0009wv-HU for emacs-orgmode@gnu.org; Wed, 15 Mar 2023 06:10:02 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: emacs-orgmode@gnu.org Subject: 1 character fix to make ob-haskell compatible with table outputs Date: Tue, 14 Mar 2023 22:22:13 -0500 Message-ID: <87bkkuitqy.fsf@mailfence.com> Mime-Version: 1.0 Content-Type: text/plain User-Agent: Gnus/5.13 (Gnus v5.13) Cancel-Lock: sha1:k+pRL/CRNEmVLEYyKSZf98pYw88= Received-SPF: pass client-ip=116.202.254.214; envelope-from=geo-emacs-orgmode@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: -15 X-Spam_score: -1.6 X-Spam_bar: - X-Spam_report: (-1.6 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.25, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Migadu-Queue-Id: 39222135DD X-Spam-Score: -3.03 X-Migadu-Spam-Score: -3.03 X-Migadu-Scanner: scn0.migadu.com Reply-to: ParetoOptimalDev From: ParetoOptimalDev via "General discussions about Org-mode." Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-TUID: gwC5t8gEDqd1 Just change the `[` and `]` to `(` and `)` respectively. List of lists aren't parsed correctly by ob-haskell, but tuples of tuples are. That means this code change I just tested works: (defun org-babel-haskell-var-to-haskell (var) "Convert an elisp value VAR into a haskell variable. The elisp VAR is converted to a string of haskell source code specifying a variable of the same value." (if (listp var) (concat "(" (mapconcat #'org-babel-haskell-var-to-haskell var ", ") ")") (format "%S" var))) For something like: name:tbl #+begin_src sh echo -e "1\t2\t3" #+end_src #+RESULTS: | 1 | 2 | 3 | #+begin_src haskell :var table=tbl print table #+end_src #+RESULTS: | 1 | 2 | 3 | Whereas before it would not print the table out because it isn't parsed correctly.