[improve printing of CPR annotations, trim annotations to 5 levels deep to avoid slowdown with large amounts of constant data
John Meacham <john@repetae.net>**20090226081353
 Ignore-this: 61723570839b46e1d27eb8f04a7b2040
] hunk ./E/CPR.hs 17
+import Name.VConsts
hunk ./E/CPR.hs 37
+trimVal v = f (0::Int) v where
+    f !n Tup {} | n > 5 = Top
+    f n (Tup x vs) = Tup x (map (f (n + 1)) vs)
+    f n (Fun v) = Fun (f n v)
+    f _ x = x
+
+
hunk ./E/CPR.hs 53
+    showsPrec _ (Tup n [x,xs]) | n == dc_Cons = shows x <> showChar ':' <> shows xs
+    showsPrec _ (Tup n xs) | Just _ <- fromTupname n  = tupled (map shows xs)
hunk ./E/CPR.hs 57
+    showsPrec _ (Tag [n]) | n == dc_EmptyList = showString "[]"
+    showsPrec _ (Tag [n]) = shows n
hunk ./E/CPR.hs 97
-        (e',v) -> f (envInsert t v env) rs ((tvrInfo_u (Info.insert v) t,e'):zs)
+        (e',v) -> f (envInsert t v env) rs ((tvrInfo_u (Info.insert $ trimVal v) t,e'):zs)
hunk ./E/CPR.hs 99
-        g 0 mp =  f nenv rs ([ (tvrInfo_u (Info.insert b) t,e)   | (t,(e,b)) <- mp] ++ zs)  where
+        g 0 mp =  f nenv rs ([ (tvrInfo_u (Info.insert $ trimVal b) t,e)   | (t,(e,b)) <- mp] ++ zs)  where