[get rid of references to old SC type outside of lambdalifting module, add module name to Program type, make Grin.compile take a Program rather than an SC
John Meacham <john@repetae.net>**20060207041231] hunk ./E/LambdaLift.hs 1
-module E.LambdaLift(SC(..), scToE, eToSC, lambdaLift, lambdaLiftE)  where
+module E.LambdaLift(lambdaLiftE)  where
hunk ./E/Program.hs 24
+    progModule :: Module,
hunk ./E/Program.hs 35
+    progModule = mainModule,
hunk ./Grin/FromE.hs 13
-import Support.CanType
hunk ./Grin/FromE.hs 21
-import E.LambdaLift
+import E.Program
hunk ./Grin/FromE.hs 24
-import Support.FreeVars
hunk ./Grin/FromE.hs 36
+import Support.CanType
+import Support.FreeVars
hunk ./Grin/FromE.hs 40
+import Util.UniqueMonad()
hunk ./Grin/FromE.hs 112
-compile ::  DataTable -> Map Int Name -> SC -> IO Grin
-compile dataTable _ sc@SC { scMain = mt, scCombinators = cm } = do
+compile :: Program -> IO Grin
+compile prog@Program { progDataTable = dataTable, progCombinators = cm, progMainEntry = mt } = do
hunk ./Grin/FromE.hs 117
-    let (cc,reqcc) = constantCaf dataTable sc
+    let (cc,reqcc) = constantCaf prog
hunk ./Grin/FromE.hs 164
-    scMap = fromList [ (tvrNum t,toEntry x) |  x@(t,_,_) <- scCombinators sc]
+    scMap = fromList [ (tvrNum t,toEntry x) |  x@(t,_,_) <- progCombinators prog]
hunk ./Grin/FromE.hs 194
-constantCaf :: DataTable -> SC -> ([(TVr,Var,Val)],[Var])
-constantCaf dataTable (SC _ ds) = ans where
+constantCaf :: Program -> ([(TVr,Var,Val)],[Var])
+constantCaf Program { progDataTable = dataTable, progCombinators = ds } = ans where
hunk ./Main.hs 416
+    prog <- return $ programSetE lc prog
hunk ./Main.hs 418
-    let ds = scCombinators $ eToSC dataTable lc in do
+    let ds = progCombinators prog in do
hunk ./Main.hs 427
-    let SC v rs = eToSC dataTable lc
hunk ./Main.hs 428
-    rs' <- flip mapM rs $ \ (t,ls,e) -> do
+    prog <- return $ programSetE lc prog
+
+
+    rs' <- flip mapM (progCombinators prog) $ \ (t,ls,e) -> do
hunk ./Main.hs 441
-    lc <- return $ scToE (SC v rs')
+    prog <- return $ prog { progCombinators = rs' }
hunk ./Main.hs 444
-    wdump FD.Lambdacube $ printCheckName dataTable lc
+    wdump FD.Lambdacube $ printCheckName dataTable (programE prog)
hunk ./Main.hs 447
-    wdump FD.Progress $ printEStats lc
+    wdump FD.Progress $ printEStats (programE prog)
hunk ./Main.hs 451
-    x <- Grin.FromE.compile dataTable (error "vmap") (eToSC dataTable lc)
+    x <- Grin.FromE.compile prog
hunk ./Makefile 64
-tests: calendar primes
+tests: helloworld calendar primes
hunk ./Makefile 66
+helloworld: jhc
+	./jhc -v $(JHC_TEST) test/HelloWorld.hs -o $@ 2>&1 | tee $@.log
hunk ./Name/Name.hs 16
+    Module,
+    mainModule,
hunk ./Name/Name.hs 150
+mainModule = Module "Main@"