Plugins now pump state and it works!
commit7dfac29d16fc1c7d6b78410507b1e4e29ed702ad
authorAustin Seipp <austin@youareinferior.net>
Sun, 6 Jan 2008 15:38:53 +0000 (6 09:38 -0600)
committerAustin Seipp <austin@youareinferior.net>
Sun, 6 Jan 2008 15:38:53 +0000 (6 09:38 -0600)
treeafc6cfffef174e068598b122341d9ca41d692e42
parenta02d14e1e5e753fe72dd8a422dd2b0c94a85cbce
Plugins now pump state and it works!
We had to use an 'explicit' way of passing state back,
but it works quite nicely as seen by this test:

austin@continuum ~/c/h/infinity-0.4> ghci Infinity.hs
GHCi, version 6.8.2: http://www.haskell.org/ghc/  :? for help
Loading package base ... linking ... done.
...
*Infinity> x <- initplugins (enabledplugins config)
...
*Infinity> (s,_) <- runplugin undefined x "get" Nothing
"Nil"
*Infinity> (s,x') <- runplugin undefined x "put" (Just ["hello world"])
*Infinity> s
"Done"
*Infinity> (s,_) <- runplugin undefined x' "get" Nothing
"hello world"
*Infinity> saveplugins x'
*Infinity> ^DLeaving GHCi.
austin@continuum ~/c/h/infinity-0.4> ls State/
StateTest.st
austin@continuum ~/c/h/infinity-0.4> ghci Infinity.hs
GHCi, version 6.8.2: http://www.haskell.org/ghc/  :? for help
Loading package base ... linking ... done.
...
*Infinity> x <- initplugins (enabledplugins config)
...
*Infinity> (s,_) <- runplugin undefined x "get" Nothing
"hello world"
*Infinity> Leaving GHCi.
austin@continuum ~/c/h/infinity-0.4>

Very fun stuff, indeed. We can now go full force ahead
with the actual connection code!

(Note: we also removed the Core.hs-boot file as I noticed
it now has no purposes.)
Infinity/Core.hs-boot [deleted file]
Infinity/Plugins.hs
Infinity/Plugins/HelloWorld.hs
Infinity/Plugins/StateTest.hs