RE: Is it possible to load bindings into ghci

On 25 August 2004 15:06, Andreas Marth wrote:
Later Tomasz Z.
How about this:
def . readFile :. C.hs
I guess I got there first ;)
That works great! And you can even put the ":def . readFile" in the .ghci File! So now I start ghci with "ghci MyFile" wait until it's finished and do ":. all_the_stuff_I_need_in_a_file" and every thing is fine!
Yes, that's a neat trick. I'm annoyed I didn't think of it, especially since I'm the one who invented :def. Duh :-) Cheers, Simon

On Wed, Aug 25, 2004 at 04:04:41PM +0100, Simon Marlow wrote:
Yes, that's a neat trick. I'm annoyed I didn't think of it, especially since I'm the one who invented :def. Duh :-)
I think this is a good example to include in the documentation. Especially because in all other examples the (String -> IO String) function returns just "". PS. Simon, big thanks for :def and the rest of GHC :) Best regards, Tom -- .signature: Too many levels of symbolic links
participants (2)
-
Simon Marlow
-
Tomasz Zielonka