emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eric Schulte <schulte.eric@gmail.com>
To: "András Major" <andras.g.major@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Bug: Babel: haskell code evaluation inconsistency [7.7 (release_7.7.160.g3e33)]
Date: Tue, 23 Aug 2011 08:20:51 -0600	[thread overview]
Message-ID: <87k4a4fazw.fsf@gmail.com> (raw)
In-Reply-To: loom.20110823T104108-575@post.gmane.org

András Major <andras.g.major@gmail.com> writes:

> Hi Eric,
>
>> I personally don't have time to make these changes right now, but I'd be
>> happy to provide guidance and answer questions to anyone who wanted to
>> try to submit a patch.  Also, there are a number of files which can
>> serve as examples of how to compile and execute code with Babel e.g.,
>> ob-java.el and ob-C.el.
>
> That's what I suspected judging from the behaviour I've seen.  Is
> anyone else interested in such work?  I don't have much time either,
> in particular I'm not sufficiently familiar with emacs and Lisp to do
> something useful quickly.
>
>> I would prefer to keep haskell as the source block type if only so that
>> the blocks are fontified with haskell-mode.  However something like an
>> :engine or :compiler keyword could be used to specify ghc or hugs.
>
> Good idea, but specifying ghc is ambiguous: it'll have to be either
> ghci, runghc/runhaskell, oder hugs, or maybe some other
> interpreter/compiler someone else would like to use (nhc98, etc.,
> there a quite a few).  At least the three options I listed all have
> incompatibilities in even the simplest use cases, owing to the
> peculiarities of Haskell as a pure, declarative language.
>

A more open-ended :compiler or :interpreter header argument accepting
ghc, rungch, hugs and nhc98 among others, sounds like a good idea.

>
> Also, using runghc would require the code block to be tangled first
> into a temporary file.  Is that easily done in babel?
>

Very easily, see ob-java.el.  Adopting the compile-then-run
functionality from there should not be a large task.

Best -- Eric

>
>   András
>
>
>

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/

      reply	other threads:[~2011-08-23 14:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-19 22:38 Bug: Babel: haskell code evaluation inconsistency [7.7 (release_7.7.160.g3e33)] Major A
2011-08-21 18:24 ` Eric Schulte
2011-08-23  8:56   ` András Major
2011-08-23 14:20     ` Eric Schulte [this message]

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=87k4a4fazw.fsf@gmail.com \
    --to=schulte.eric@gmail.com \
    --cc=andras.g.major@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public 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).