diff options
Diffstat (limited to 'compiler/GHC/Rename/Names.hs')
-rw-r--r-- | compiler/GHC/Rename/Names.hs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/compiler/GHC/Rename/Names.hs b/compiler/GHC/Rename/Names.hs index 2abc65e001..40853a16e2 100644 --- a/compiler/GHC/Rename/Names.hs +++ b/compiler/GHC/Rename/Names.hs @@ -451,11 +451,11 @@ calculateAvails home_unit iface mod_safe' want_boot imported_by = -- 'imp_finsts' if it defines an orphan or instance family; thus the -- orph_iface/has_iface tests. - orphans | orph_iface = ASSERT2( not (imp_sem_mod `elem` dep_orphs deps), ppr imp_sem_mod <+> ppr (dep_orphs deps) ) + orphans | orph_iface = assertPpr (not (imp_sem_mod `elem` dep_orphs deps)) (ppr imp_sem_mod <+> ppr (dep_orphs deps)) $ imp_sem_mod : dep_orphs deps | otherwise = dep_orphs deps - finsts | has_finsts = ASSERT2( not (imp_sem_mod `elem` dep_finsts deps), ppr imp_sem_mod <+> ppr (dep_orphs deps) ) + finsts | has_finsts = assertPpr (not (imp_sem_mod `elem` dep_finsts deps)) (ppr imp_sem_mod <+> ppr (dep_orphs deps)) $ imp_sem_mod : dep_finsts deps | otherwise = dep_finsts deps @@ -488,8 +488,8 @@ calculateAvails home_unit iface mod_safe' want_boot imported_by = -- Imported module is from another package -- Dump the dependent modules -- Add the package imp_mod comes from to the dependent packages - ASSERT2( not (ipkg `elem` (map fst $ dep_pkgs deps)) - , ppr ipkg <+> ppr (dep_pkgs deps) ) + assertPpr (not (ipkg `elem` (map fst $ dep_pkgs deps))) + (ppr ipkg <+> ppr (dep_pkgs deps)) ([], (ipkg, False) : dep_pkgs deps, False) in ImportAvails { @@ -1127,16 +1127,16 @@ filterImports iface decl_spec (Just (want_hiding, L l import_items)) -> (GreName, AvailInfo, Maybe Name) combine (NormalGreName name1, a1@(AvailTC p1 _), mb1) (NormalGreName name2, a2@(AvailTC p2 _), mb2) - = ASSERT2( name1 == name2 && isNothing mb1 && isNothing mb2 - , ppr name1 <+> ppr name2 <+> ppr mb1 <+> ppr mb2 ) + = assertPpr (name1 == name2 && isNothing mb1 && isNothing mb2) + (ppr name1 <+> ppr name2 <+> ppr mb1 <+> ppr mb2) $ if p1 == name1 then (NormalGreName name1, a1, Just p2) else (NormalGreName name1, a2, Just p1) -- 'combine' may also be called for pattern synonyms which appear both -- unassociated and associated (see Note [Importing PatternSynonyms]). combine (c1, a1, mb1) (c2, a2, mb2) - = ASSERT2( c1 == c2 && isNothing mb1 && isNothing mb2 - && (isAvailTC a1 || isAvailTC a2) - , ppr c1 <+> ppr c2 <+> ppr a1 <+> ppr a2 <+> ppr mb1 <+> ppr mb2 ) + = assertPpr (c1 == c2 && isNothing mb1 && isNothing mb2 + && (isAvailTC a1 || isAvailTC a2)) + (ppr c1 <+> ppr c2 <+> ppr a1 <+> ppr a2 <+> ppr mb1 <+> ppr mb2) $ if isAvailTC a1 then (c1, a1, Nothing) else (c1, a2, Nothing) |