diff options
| author | Edward Z. Yang <ezyang@cs.stanford.edu> | 2015-03-06 20:01:12 -0800 |
|---|---|---|
| committer | Edward Z. Yang <ezyang@cs.stanford.edu> | 2015-03-07 11:30:39 -0800 |
| commit | 68d4f47212633d101c5f4963dbfccf0fb9a8580f (patch) | |
| tree | 3d1a478f2d5719a6442ec94e3cd8c0889aba515f /compiler/main/Packages.hs | |
| parent | e642de625651c4af0e42932d447d1f53b218aebf (diff) | |
| download | haskell-68d4f47212633d101c5f4963dbfccf0fb9a8580f.tar.gz | |
Store renamings as (ModuleName, ModuleName) pairs.
Summary: Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: validate
Reviewers: austin, simonpj
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D710
Diffstat (limited to 'compiler/main/Packages.hs')
| -rw-r--r-- | compiler/main/Packages.hs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/compiler/main/Packages.hs b/compiler/main/Packages.hs index 42aa0a1d80..e36221bac2 100644 --- a/compiler/main/Packages.hs +++ b/compiler/main/Packages.hs @@ -502,10 +502,8 @@ applyPackageFlag dflags unusable (pkgs, vm) flag = Right (p:_,_) -> return (pkgs, vm') where n = fsPackageName p - vm' = addToUFM_C edit vm_cleared (packageConfigId p) - (b, map convRn rns, n) + vm' = addToUFM_C edit vm_cleared (packageConfigId p) (b, rns, n) edit (b, rns, n) (b', rns', _) = (b || b', rns ++ rns', n) - convRn (a,b) = (mkModuleName a, mkModuleName b) -- ToDo: ATM, -hide-all-packages implicitly triggers change in -- behavior, maybe eventually make it toggleable with a separate -- flag @@ -611,8 +609,8 @@ pprFlag flag = case flag of ppr_rns (ModRenaming b rns) = if b then text "with" else Outputable.empty <+> char '(' <> hsep (punctuate comma (map ppr_rn rns)) <> char ')' - ppr_rn (orig, new) | orig == new = text orig - | otherwise = text orig <+> text "as" <+> text new + ppr_rn (orig, new) | orig == new = ppr orig + | otherwise = ppr orig <+> text "as" <+> ppr new -- ----------------------------------------------------------------------------- -- Wired-in packages |
