On the fly Haskell programming?

Jeremy Gore jeremy.gore@yale.edu
Fri, 7 Feb 2003 11:34:39 -0500


I've been poking around with Hugs, and at the same time also python's 
interactive interpreter.  They are similar in a number of respects.  
After playing around with both I thought of some features t

In python, you can type in things at the command line and they will 
stay in memory (for instance, x = 13+4 outputs 21; type x again and it 
outputs 21, etc.)  You can type in a whole program in this way.  
Unfortunately there is no way to save it afterwards AFAIK, a feature 
that should be implemented.  In the case of Hugs, this seems a natural 
approach for a Haskell interpreter.  Why not be able to type in 
functions and their type data at the command line to experiment with 
them?  At the end of the session, the results of your experimentation 
could be saved to a file in the proper format (type info first, then 
function defs) to clean up and document.  Or alternatively it would be 
saved to a preferences file of sorts, with the option of loading it 
automatically the next time hugs is started.

I suppose using :edit and :reload is pretty close to this, but building 
programs on the fly in this manner seems to me to be an extremely 
powerful approach with great potential usefulness in the real world.  
Is there any sort of Haskell (or other functional programming) shell 
out there?
--
Jeremy Gore
1515 State St
New Haven, CT 06511
203-776-4911