[Haskell-beginners] Question about Interpreter

Brandon Allbery allbery.b at gmail.com
Sat Dec 3 20:08:31 CET 2011


On Sat, Dec 3, 2011 at 06:37, Song Zhang <vxanica at gmail.com> wrote:

>    I am a beginner of Haskell. I want to know why the interpreter was
> designed in a way that one function or a part fails the whole program fails.
>

It's been discussed on the list before; the short version is that loading a
module compiles it (to bytecode, but that doesn't change the fact that it's
using the compiler code path instead of evaluating expressions via the GHC
API), which is all or nothing.  At an internediate level, it might be
possible to "rephrase" it to the interpreter, but then you run into
potential oddities with types.

The interpreter is being reworked in ways that would ultimately allow what
you want; this is ongoing work, though, and I don't know how long it will
be before what you want will be possible.

-- 
brandon s allbery                                      allbery.b at gmail.com
wandering unix systems administrator (available)     (412) 475-9364 vm/sms
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20111203/ffd285e7/attachment.htm>


More information about the Beginners mailing list