On Sat, Dec 3, 2011 at 06:37, Song Zhang <vxanica@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@gmail.com
wandering unix systems administrator (available)     (412) 475-9364 vm/sms