emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Robin Green <greenrd@greenrd.org>
To: emacs-orgmode@gnu.org
Cc: Dan Davison <davison@stats.ox.ac.uk>
Subject: Bugs in ob-haskell
Date: Sun, 21 Nov 2010 13:00:50 +0000	[thread overview]
Message-ID: <87tyjaesql.wl%greenrd@greenrd.org> (raw)

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

             reply	other threads:[~2010-11-21 13:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-21 13:00 Robin Green [this message]
2010-11-23 14:49 ` Eric Schulte

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87tyjaesql.wl%greenrd@greenrd.org \
    --to=greenrd@greenrd.org \
    --cc=davison@stats.ox.ac.uk \
    --cc=emacs-orgmode@gnu.org \
    --subject='Re: Bugs in ob-haskell' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Code repositories for project(s) associated with this inbox:

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).