Marcin 'Qrczak' Kowalczyk writes on [EMAIL PROTECTED]:
> Let's imagine that I will want to allow writing scripts to customize
> a hypothetical text editor written in Haskell, similarly as one can
> write S-Lang in jed/slrn or LISP in Emacs. What choices will I have?
> Asking for advices.

Some time ago I thought of something like your idea #5, but with the
"existing language" not being Python or the like but Haskell again:

> 5. Try to reimplement in Haskell the interpreter of an existing
>    language that is simple enough (Python?). It even less depends on
>    tools that may vanish (i.e. e.g. stop being supported for future
>    new Haskell versions), but is very complex if promising to
>    implement the language correctly and fully.

Due to the usual more important other things to do, however, I have
postponed the idea of an implementation of Haskell in Haskell for
scripting purposes.

The main advantage of using the same language for the implementation of
a program and for scripting is that scripts that have grown large over
time can be integrated into the program itself more easily. (At least I
would hope so.)

Such a system might also be sexy enough for a shared effort in the
Haskell community, whereas "Python in Haskell" might not be. It might be
possible to steal a lot of code for the front end from GHC, or to use
Mark P. Jones' Haskell type checker in Haskell. Furthermore I think many
of us (including myself) have at some time implemented an interpreter of
a toy functional language in Haskell, which could be used as the back
end. (Actually my recent questions about the implementation of type
classes arose because I was not sure whether any run-time support is
needed for them. Fortunately it turned out that it is not needed.)

But of course if the great merger of GHC and Hugs provides all the
needed functionality (including, e.g., the possibility to load and
invoke interpreted modules from within compiled code), then such a
project might be superfluous, and your idea #1 becomes the best choice.
(Is there any information yet about what the combined GHC/Hugs system
will look like?)

Regards,
Heribert.


[Notice that I have changed the mailing list from
[EMAIL PROTECTED] to [EMAIL PROTECTED]]



Reply via email to