@@ -101,7 +101,9 @@ buildDepMap ctx ns = addMain $ dfs S.empty M.empty ns
101 -- extract all names that a function depends on
101 -- extract all names that a function depends on
102 -- from the Deps of the function
102 -- from the Deps of the function
103 depNames :: Deps -> Set Name
103 depNames :: Deps -> Set Name
104− depNames = S.unions . map (S.map fst) . M.keys
104+ depNames = S.unions . map names . M.toList
106+ names (cs, ns) = S.map fst cs `S.union` S.map fst ns
106 -- get Deps for a Name
108 -- get Deps for a Name
107 getDeps :: Name -> Deps
109 getDeps :: Name -> Deps