ndmitchell at gmail.com
Fri Aug 18 05:54:21 EDT 2006
Have you seen:
There was one with the JHC stuff which I'm sure i've seen
If what you want is a shell like thing, Shellac will give it to you.
If you want to evaluate arbitrary Haskell then hs-plugins will give it
to you. If you want both, combine them.
Probably much easier than hacking at GHCi!
On 8/18/06, Ulf Norell <ulfn at cs.chalmers.se> wrote:
> I want to use GHCi as the interface to my Application. The simple
> solution is to have the Application store its state in global IORefs.
> A user can then start up ghci with -package Application and use the
> provided functions to communicate with the Application. This works
> Now the tricky part. I want the user to be able to implement her own
> layers on top of the Application API. A typical user interaction
> could look something like this:
> $ ghci -package Application
> *Application:API> startApplication
> *Application:API> :load UserLayer
> *main:UserLayer> myCleverFunction 42
> The problem, of course, is that as soon as the user says ':load' ghci
> forgets all about the state of the Application. My solution to the
> problem is to compile my own version of ghci (copy InteractiveUI.hs
> and use -package ghc) and remove the call to rts_revertCAFs when
> loading new modules. This seems to work, but since I don't really
> have a clue what I'm doing I wanted to ask a few questions:
> 1) What is a CAF?
> 2) What breaks down if you don't revert them?
> 3) Does not reverting the CAFs really solve my problem?
> / Ulf
> Glasgow-haskell-users mailing list
> Glasgow-haskell-users at haskell.org
More information about the Glasgow-haskell-users