[Hugs-users] Proposal: Next generation of Hugs
oakad at yahoo.com
Sat Jul 30 14:51:49 EDT 2005
I was playing with Haskell and particularly Hugs
lately and came to the conclusion that Hugs-style
interpreter can be a real blessing as embedded
application language (akin to ecmascript interpreters
or guile). Two nicest features in this direction are:
1. The ability to evaluate arbitrarily complex
expressions interactively without the ability to
2. Simple expressions in Haskell are more intuitive
than most languages offer.
I understand that I've just invented the wheel.
However, after looking at hugs source code and hugs
server api I think few very desirable features shall
1. api to control importing of modules
2. api to control resolution of foreign symbols
3. Additionally it would be nice to have the ability
to evaluate literal Haskell expressions from within
Haskell program, allowing Haskell implementations of
preprocessors for user defined language features.
Also, in its current state Hugs ability to run
programs is quite lacking in certain areas (I mean
resource management - memory and stack). This calls
for next point:
4. No internal limitations in the interpreter. Let it
fail only when system resources are exhausted.
And two more points:
5. Let interpreter/compiler to exist separately from
possible frontends in form of library.
6. It will be nice to have support for precompilation
I have a great desire to make an implementation of
Haskell interpreter with all these features. I want to
do it in C++, as this will allow much cleaner
implementation than C (no more macros!) without large
performance loss (not that it matters greatly).
I, however, need a help with top-level design of the
interpreter. Does anybody has any suggestions on data
structures and code organization in general? May be
some work was done already in the direction that can
I'll appreciate any feedback to this message.
Start your day with Yahoo! - make it your home page
More information about the Hugs-Users