Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : 

http://hackage.haskell.org/trac/ghc/changeset/63c094482a6e66529d8a21f75f8c1e2803a26573

>---------------------------------------------------------------

commit 63c094482a6e66529d8a21f75f8c1e2803a26573
Author: Max Bolingbroke <batterseapo...@hotmail.com>
Date:   Wed Oct 26 15:05:33 2011 +0100

    Fill out sc' definition: history still not propagated

>---------------------------------------------------------------

 .../supercompile/Supercompile/Drive/Process2.hs    |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/compiler/supercompile/Supercompile/Drive/Process2.hs 
b/compiler/supercompile/Supercompile/Drive/Process2.hs
index a023dd1..70c6014 100644
--- a/compiler/supercompile/Supercompile/Drive/Process2.hs
+++ b/compiler/supercompile/Supercompile/Drive/Process2.hs
@@ -216,6 +216,9 @@ promise state ms = (p, ms)
             hNames   = h_names'
           }
 
+instance MonadStatics (DelayM (MemoT HistoryM)) where
+    -- FIXME
+
 memo :: (State -> HistoryM (ScpM (Deeds, Out FVedTerm)))
      -> State -> MemoT HistoryM (ScpM (Deeds, Out FVedTerm))
 memo opt state = MT $ \ms ->
@@ -238,7 +241,9 @@ memo opt state = MT $ \ms ->
 type RollbackScpM = () -- Generaliser -> ScpBM (Deeds, Out FVedTerm)
 
 sc' :: State -> HistoryM (ScpM (Deeds, Out FVedTerm))
-sc' state = error "FIXME"
+sc' state = \hist -> case terminate hist (state, ()) of
+                       Continue hist'             -> split (snd $ reduce 
state) (delay . sc) -- FIXME: use hist'
+                       Stop (shallower_state, ()) -> maybe (split state) id 
(generalise (mK_GENERALISER shallower_state state) state) (delay . sc)
 
 sc :: State -> MemoT HistoryM (ScpM (Deeds, Out FVedTerm))
 sc = memo sc' . gc -- Garbage collection necessary because normalisation might 
have made some stuff dead



_______________________________________________
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to