[fix bug that would cause lets in the body of fully lifted lets to not be lifted. demonstrated by bernoulli nobench test.
John Meacham <john@repetae.net>**20100726220452
 Ignore-this: af0dfd99b22c27a6b4cef8402a091c0d
] hunk ./src/Grin/Devolve.hs 7
+import Data.Functor
hunk ./src/Grin/Devolve.hs 37
-        f lt@Let { expDefs = defs, expBody = body } = do
-            let nonTail = expNonNormal lt
-                iterZ :: Bool -> Map.Map Tag (Set.Set Val) -> [FuncDef] -> Map.Map Tag (Set.Set Val)
+        f lt@Let { expDefs = defs, expBody = body, .. } = do
+            let iterZ :: Bool -> Map.Map Tag (Set.Set Val) -> [FuncDef] -> Map.Map Tag (Set.Set Val)
hunk ./src/Grin/Devolve.hs 45
-                nndefs = [ fd | fd <- defs, funcDefName fd `Set.member` nonTail ]
+                nndefs = [ fd | fd <- defs, funcDefName fd `Set.member` expNonNormal ]
hunk ./src/Grin/Devolve.hs 50
-                    | name `Set.member` nonTail = Left ((name,(as ++ xs) :-> pr),xs)
+                    | name `Set.member` expNonNormal = Left ((name,(as ++ xs) :-> pr),xs)
hunk ./src/Grin/Devolve.hs 59
-            mapExpExp f $  updateLetProps lt { expDefs = rmaps, expBody = runIdentity $ proc body }
+            updateLetProps <$> mapExpExp f lt { expDefs = rmaps, expBody = runIdentity $ proc body }
hunk ./src/Grin/Noodle.hs 8
+import Data.Functor
hunk ./src/Grin/Noodle.hs 111
-        mapExpLam g l { expBody = b }
+        return updateLetProps `ap` (mapExpLam g l { expBody = b })
+    f (GcRoots vs e) = return (GcRoots vs) `ap` fn e
hunk ./src/Grin/Show.hs 105
-prettyExp vl Let { expDefs = defs, expBody = body } = vl <> keyword "let" <$> indent 4 (vsep $ map f defs) <$> text " in" <$> indent 2 (prettyExp empty body) where
+prettyExp vl Let { expDefs = defs, expBody = body, .. } = vl <> keyword (if expIsNormal then "let" else "let*") <$> indent 4 (vsep $ map f defs) <$> text " in" <$> indent 2 (prettyExp empty body) where