@@ -211,7 +211,7 @@ findExports = foldM addModule M.empty
211211-- |
212212-- Type representing a set of declarations being explicitly imported from a module
213213--
214−type ExplicitImports = [ImportType]
214+type ExplicitImports = [DeclarationRef]
215215
216216-- |
217217-- Finds the imports within a module, mapping the imported module name to an optional set of
@@ -249,24 +249,24 @@ resolveImport currentModule importModule exp imp i = case i of
249249 -- Import everything from a module
250250 importAll :: ImportEnvironment -> Either String ImportEnvironment
251251 importAll imp = do
252− imp' <- foldM (\m (name, dctors) -> importExplicit m (TypeImport name (Just dctors))) imp (S.toList $ exportedTypes exp)
253− imp'' <- foldM (\m name -> importExplicit m (NameImport name)) imp' (S.toList $ exportedValues exp)
254− foldM (\m name -> importExplicit m (TypeClassImport name)) imp'' (S.toList $ exportedTypeClasses exp)
252+ imp' <- foldM (\m (name, dctors) -> importExplicit m (TypeRef name (Just dctors))) imp (S.toList $ exportedTypes exp)
253+ imp'' <- foldM (\m name -> importExplicit m (ValueRef name)) imp' (S.toList $ exportedValues exp)
254+ foldM (\m name -> importExplicit m (TypeClassRef name)) imp'' (S.toList $ exportedTypeClasses exp)
255255
256256 -- Import something explicitly
257− importExplicit :: ImportEnvironment -> ImportType -> Either String ImportEnvironment
258− importExplicit imp (NameImport name) = do
257+ importExplicit :: ImportEnvironment -> DeclarationRef -> Either String ImportEnvironment
258+ importExplicit imp (ValueRef name) = do
259259 checkImportExists "value" values name
260260 values' <- updateImports (importedValues imp) name
261261 return $ imp { importedValues = values' }
262− importExplicit imp (TypeImport name dctors) = do
262+ importExplicit imp (TypeRef name dctors) = do
263263 checkImportExists "type" types name
264264 types' <- updateImports (importedTypes imp) name
265265 let allDctors = allExportedDataConstructors name
266266 dctors' <- maybe (return allDctors) (mapM $ checkDctorExists allDctors) dctors
267267 dctors'' <- foldM updateImports (importedDataConstructors imp) dctors'
268268 return $ imp { importedTypes = types', importedDataConstructors = dctors'' }
269− importExplicit imp (TypeClassImport name) = do
269+ importExplicit imp (TypeClassRef name) = do
270270 checkImportExists "type class" classes name
271271 typeClasses' <- updateImports (importedTypeClasses imp) name
272272 return $ imp { importedTypeClasses = typeClasses' }