[Haskell-cafe] First steps in Haskell

Tomasz Zielonka tomasz.zielonka at gmail.com
Tue Dec 20 16:37:06 EST 2005


On Mon, Dec 19, 2005 at 01:17:35PM -0000, Simon Peyton-Jones wrote:
> | Actually, I have sometimes wished that the various interactive Haskell
> | interfaces had the possibility to enter also declarations interactively
> 
> GHCi does.
> 
> ghci>  let f x = "hello"
> ghci> f True
> True
> 
> But there's no editor -- it's strictly a one-line definition

Consider this:

    Prelude> :def read readFile
    Prelude> :!cat input
    let f x = "hello"
    Prelude> :read input
    Prelude> f ()
    "hello"

If we had a program that would:
- move top-level definitions to a "let"
- convert layout to explicit { ; }
then it would be quite simple to define (with :def) a command that would
allow to enter some code in the editor and load it into ghci, even
without clearing the older definitions (as :load does).

However, no datatype/class/... declarations, etc. Unless we could
allow them in "let"?

These should be possible to do with haskell-src-ext, programmatica or
GHC itself.

Best regards
Tomasz

-- 
I am searching for a programmer who is good at least in some of
[Haskell, ML, C++, Linux, FreeBSD, math] for work in Warsaw, Poland


More information about the Haskell-Cafe mailing list