interpreter features

Eray Ozkural (exa)
Tue, 30 Oct 2001 09:56:26 +0200

Hash: SHA1

On Tuesday 30 October 2001 09:08, Johannes Waldmann wrote:
> > But        Prelude> let {type T = Int;  n = 1 :: T}
> > does not.
> yes, local type declarations would be nice (not just for ghci)
> but that requires serious design work (in the type and module system).
> See the recent paper on first class modules posted here.

What about my idea? Can't there be a module, say called *interpreter* which 
you can add and remove definitions from on-the-fly? That might not be too 
hard to implement.

Ah, if only I had an "eval" function.

> > I would like too Haskell to behave like a good interpreter, with
> > self-applicability, dynamic features, like, maybe, some Lisp systems do.
> If I want LISP, I use LISP, but most of the time I want strict typing
> at compile time, and therefore I use Haskell. Sometimes, I end up
> writing (in Haskell) mini-interpreters (for some domain-specific language).
> Seems like a reasonable compromise.

Yes, but I don't think an interpreter has much to do with dynamic typing. 
There are interpreters for all sorts of languages. It ought to be possible to 
get more interactive after all. ;)

Something that would put you tighter in the loop. Without having to go back 
to the editor edit stuff, reload from interpreter, choke on error, see what 
went wrong, etc. Just scratch some code on the CLI, see what you've defined 
so far, edit the current module, and evaluate what you want to. That should 
be easier than adding new semantics to the language. Kind of like a small 
text editor embedded in the interpreter, isn't that an original idea? :P


- -- 
Eray Ozkural (exa) <>
Comp. Sci. Dept., Bilkent University, Ankara
GPG public key fingerprint: 360C 852F 88B0 A745 F31B  EA0F 7C07 AE16 874D 539C
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see