@@ -157,6 +157,7 @@ directUse (Bind n (Let t v) sc) = nub $ directUse v ++ (directUse sc \\ [n])
157directUse (Bind n b sc) = nub $ directUse (binderTy b) ++ (directUse sc \\ [n])
157directUse (Bind n b sc) = nub $ directUse (binderTy b) ++ (directUse sc \\ [n])
158directUse fn@(App f a)
158directUse fn@(App f a)
159 | (P Ref n _, args) <- unApply fn = [] -- need to know what n does with them
159 | (P Ref n _, args) <- unApply fn = [] -- need to know what n does with them
160+ | (P (TCon _ _) n _, args) <- unApply fn = [] -- type constructors not used at runtime
160 | otherwise = nub $ directUse f ++ directUse a
161 | otherwise = nub $ directUse f ++ directUse a
161directUse (Proj x i) = nub $ directUse x
162directUse (Proj x i) = nub $ directUse x
162directUse _ = []
163directUse _ = []