@@ -101,7 +101,9 @@ buildDepMap ctx ns = addMain $ dfs S.empty M.empty ns
101101 -- extract all names that a function depends on
102102 -- from the Deps of the function
103103 depNames :: Deps -> Set Name
104− depNames = S.unions . map (S.map fst) . M.keys
104+ depNames = S.unions . map names . M.toList
105+ where
106+ names (cs, ns) = S.map fst cs `S.union` S.map fst ns
105107
106108 -- get Deps for a Name
107109 getDeps :: Name -> Deps