On Jul 29, 2008, at 2:43 PM, Johannes Waldmann wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


data Target = Target TargetId (Maybe (StringBuffer,ClockTime))

looks great. How is this intended to be used,
i.e. what should happen if there is an "edit/save" event in the IDE?
Then the IDE constructs a new StringBuffer from the buffer contents
and sends it to the GHC API? (what call?)

IIRC,you first set (or add) targets (with GHC.setTargets or GHC.addTargets) and then run GHC.load indicating LoadAllTargets. I *think* it will chose to use the StringBuffer only if the ClockTime is newer than the file's timestamp. Thus, if the user updates and saves the file between the creation of the StringBuffer and the actual call to GHC.load, ghc will load the target from disk.

But I'm mostly guessing here, so you should probably try it out and see if it works :)

Daniel
_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Reply via email to