From mboxrd@z Thu Jan 1 00:00:00 1970 From: Robin Green Subject: Bugs in ob-haskell Date: Sun, 21 Nov 2010 13:00:50 +0000 Message-ID: <87tyjaesql.wl%greenrd@greenrd.org> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Return-path: Received: from [140.186.70.92] (port=34635 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PK9dD-0002zP-Kn for emacs-orgmode@gnu.org; Sun, 21 Nov 2010 08:07:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PK9dB-0004n8-O5 for emacs-orgmode@gnu.org; Sun, 21 Nov 2010 08:06:58 -0500 Received: from [67.214.171.75] (port=33679 helo=mail.dnsexit.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PK9dB-0004lu-Ll for emacs-orgmode@gnu.org; Sun, 21 Nov 2010 08:06:57 -0500 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Cc: Dan Davison I've noticed a number of bugs in ob-haskell: 1. The first time I ran my code block, the results were given as something like: Prelude> [[1], [2], [3]] and of course, this isn't an org table, as it should be. I don't think the "Prelude> " should have been there, and I suspect a race condition, because after I immediately did C-c C-c again, the results changed to a table. 2. Looking at ob-haskell.el, it seems like Haskell strings are converted into text by removing leading and trailing double quotes. However, if there are double quote characters inside the string, they will be escaped with a backslash when printed, and they will presumably need to be unescaped. (Haven't tested this though.) 3. Ordinary Haskell lists can't have values of different types inside them, at least not without some sort of wrapper. But if you have a number and a string in your table, ob-haskell will try to make an impossible list with a number and a string in it. My preferred solution to this bug would be to force all list items to strings (at least, if there are any strings at all in the input table or list). 4. What's worse is, if ob-haskell makes an error in setting your input variables, like the error in the previous paragraph, and this is not the first run of that code block and you haven't changed the variable names, the error arising from the "let" command will simply be ignored silently by ob-haskell! The previous value of the variable will be used instead. At least, that is what happens to me. Regards, -- Robin Green