[treat types as atomic values.
John Meacham <john@repetae.net>**20060313123635] hunk ./E/E.hs 295
-isAtomic :: E -> Bool
---isAtomic e | sortTypeLike e = True
-isAtomic EVar {}  = True
-isAtomic e = isFullyConst e
hunk ./E/FromHs.hs 323
-        e2 <- atomizeAp dataTable Stats.theStats e2'
+        e2 <- atomizeAp False dataTable Stats.theStats e2'
hunk ./E/LetFloat.hs 23
+import E.TypeCheck
hunk ./E/LetFloat.hs 80
-atomizeAp :: DataTable -> Stats -> E -> IO E
-atomizeAp dataTable stats e = f e  where
+atomizeAp ::
+    Bool          -- ^ whether to atomize type arguments
+    -> DataTable  -- ^ the data table for expanding newtypes
+    -> Stats      -- ^ statistics
+    -> E          -- ^ input term
+    -> IO E
+atomizeAp atomizeTypes dataTable stats e = f e  where
hunk ./E/LetFloat.hs 131
-        C.putStrLn $ show n ++ " = " ++ pprint e
+        --C.putStrLn $ show n ++ " = " ++ pprint e
hunk ./E/LetFloat.hs 133
+    isAtomic :: E -> Bool
+    isAtomic EVar {}  = True
+    isAtomic e | not atomizeTypes && sortTypeLike e = True
+    isAtomic e = isFullyConst e
hunk ./E/Strictness.hs 18
+import E.TypeCheck
hunk ./E/Strictness.hs 163
+    arg sa e@(EAp _ _) | sortTypeLike e = mempty
hunk ./E/TypeAnalysis.hs 198
+getValue e = value `liftM` fuzzyConstant e  -- TODO - make more accurate
hunk ./E/TypeAnalysis.hs 201
+fuzzyConstant e | Just c <- typConstant e = return c
+fuzzyConstant e | Just (n,as) <- toLit e = do
+    as' <- mapM fuzzyConstant as
+    return $ vmapValue n as'
+fuzzyConstant _ = return $ (vmapPlaceholder ())
+
+
hunk ./E/TypeAnalysis.hs 247
-    f n kind vm | Just [] <- vmapHeads vm = return $ tAbsurd kind
+    -- f n kind vm | Just [] <- vmapHeads vm = return $ tAbsurd kind  TODO - absurdize values properly
hunk ./E/Values.hs 132
+isAtomic :: E -> Bool
+--isAtomic e | sortTypeLike e = True
+isAtomic EVar {}  = True
+isAtomic e | sortTypeLike e = True
+isAtomic e = isFullyConst e
hunk ./Main.hs 369
-    lc <- doopt mangle False stats "FixupLets..." (\stats x -> atomizeAp dataTable stats x >>= coalesceLets stats)  lc
+    lc <- doopt mangle False stats "FixupLets..." (\stats x -> atomizeAp False dataTable stats x >>= coalesceLets stats)  lc
hunk ./Main.hs 489
-
-    wdump FD.LambdacubeBeforeLift $ printProgram prog -- printCheckName dataTable lc
-
-
+    wdump FD.LambdacubeBeforeLift $ printProgram prog
hunk ./Main.hs 493
-    lc <- mangle dataTable (return ()) True  "FixupLets..." (\x -> atomizeAp dataTable finalStats x >>= coalesceLets finalStats)  (programE prog)
-    prog <- return $ programSetE lc prog
-
-
hunk ./Main.hs 494
+        --putStrLn (pprint t)
hunk ./Main.hs 499
-            return e'
+            e'' <- atomizeAp True dataTable stats e'
+            return e''