
Hi, attached you'll find a safer ghci prompt, that uses an external program to evaluate haskell expression. This is still work in progress, but you can have an idea of what I'd like to do. Feedback highly appreciated! ciao andrea ps: to use: 1. save the attached file as GhcPrompt.hs and follow the install instruction; 2. save and compile the uitlity you'll find at the end of the file. 3. enjoy.

On Thu, Aug 30, 2007 at 08:21:41PM +0200, Andrea Rossato wrote:
Hi,
Hi, for the time being I'm working on the evaluation server. I thought to go with socket so this is the first attempt. Attached you'll find a new Heval. To compile: ghc --make Heval.hs -o heval -package ghc (requires the network package). This one will work with telnet (I didn't write the XPrompt side yet). To try it out: 1. run: ./heval & 2. connect with telnet: telnet localhost 10490 3. start interacting with your Haskell evaluator. To quit: :quit To stop the server: :stop The server will remember bound names between sessions. So: let f n = n ^ n will work after :quit (but not after :stop...;-). The server is quite basic so far: if you run something like: let x () = x () in x () it will get killed after 3 seconds. [1..] will work though. I'm using ghciu and hs-plugins code as examples. Please let me know what you think. Is it useful something like this (to be run from XMonad, I mean). Thanks for your kind attention. Andrea

On Thu, Aug 30, 2007 at 08:21:41PM +0200, Andrea Rossato wrote:
Hi,
Hi, this should be a prompt that doesn't crash, whatever your what you write (I hope...,-). It uses heval, an external application that comes with xmonad-utils: http://gorgias.mine.nu/repos/xmonad-utils/src/Heval.hs or darcs get http://gorgias.mine.nu/repos/xmonad-utils/ I'm not submitting it as a patch yet because I want to work on the output, especially in case of errors. Right now there are some issues with that. Hope you'll enjoy. Andrea ps: I used Eval/RunPlugs (lambdabot), plugs, hs-plugins and, obviously, GHC code and commentary as examples to follow. Hope I followed them correctly.

On Mon, Sep 03, 2007 at 02:54:36PM +0200, Andrea Rossato wrote:
write (I hope...,-). It uses heval, an external application that comes with xmonad-utils:
http://gorgias.mine.nu/repos/xmonad-utils/src/Heval.hs or darcs get http://gorgias.mine.nu/repos/xmonad-utils/
remember to review if ghcPath correct for your system otherwise heval won't work. andrea
participants (1)
-
Andrea Rossato