@@ -86,8 +86,8 @@ collapseCons ty cons =
8686 checkFR fs i (_ : xs) | i `elem` fs = checkFR fs (i + 1) xs
8787 checkFR fs i (t : xs)
8888 -- must be recursive or type is not collapsible
89− = do let rt = getRetTy t
90− if (ty `elem` freeNames rt)
89+ = do let (rtf, rta) = unApply $ getRetTy t
90+ if (ty `elem` freeNames rtf)
9191 then checkFR fs (i+1) xs
9292 else return False
9393