@@ -273,7 +273,6 @@ typeCheckModule (Module ss coms mn decls (Just exps)) = warnAndRethrow (addHint
273273 modify (\s -> s { checkCurrentModule = Just mn })
274274 decls' <- typeCheckAll mn exps decls
275275 forM_ exps $ \e -> do
276− checkTypesAreExported e
277276 checkClassMembersAreExported e
278277 checkClassesAreExported e
279278 return $ Module ss coms mn decls' (Just exps)
@@ -295,17 +294,6 @@ typeCheckModule (Module ss coms mn decls (Just exps)) = warnAndRethrow (addHint
295294 exports _ _ = False
296295 checkMemberExport _ _ = return ()
297296
298− -- Check that all the type constructors defined in the current module that appear in member types
299− -- have also been exported from the module
300− checkTypesAreExported :: DeclarationRef -> Check ()
301− checkTypesAreExported = checkMemberExport findTcons
302− where
303− findTcons :: Type -> [DeclarationRef]
304− findTcons = everythingOnTypes (++) go
305− where
306− go (TypeConstructor (Qualified (Just mn') name)) | mn' == mn = [TypeRef name (error "Data constructors unused in checkTypesAreExported")]
307− go _ = []
308−
309297 -- Check that all the classes defined in the current module that appear in member types have also
310298 -- been exported from the module
311299 checkClassesAreExported :: DeclarationRef -> Check ()