summaryrefslogtreecommitdiff
path: root/compiler/GHC/Unit
diff options
context:
space:
mode:
authorSylvain Henry <sylvain@haskus.fr>2020-05-18 12:01:57 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-06-13 02:13:03 -0400
commit36e1daf0a604d98a34d9a066a01dd4f5439b4aca (patch)
tree4c1bfcc10867c8e0f8fb0df87df740d527d5ef82 /compiler/GHC/Unit
parentbd5810dc4e23331ca4f73ec3b1818c3350b5bbd7 (diff)
downloadhaskell-36e1daf0a604d98a34d9a066a01dd4f5439b4aca.tar.gz
DynFlags: make listVisibleModuleNames take a UnitState
Diffstat (limited to 'compiler/GHC/Unit')
-rw-r--r--compiler/GHC/Unit/State.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/GHC/Unit/State.hs b/compiler/GHC/Unit/State.hs
index 2dd0941986..a3a003aeda 100644
--- a/compiler/GHC/Unit/State.hs
+++ b/compiler/GHC/Unit/State.hs
@@ -1997,9 +1997,9 @@ lookupModuleWithSuggestions' pkgs mod_map m mb_pn
(if originVisible origin then SuggestVisible else SuggestHidden)
name mod origin
-listVisibleModuleNames :: DynFlags -> [ModuleName]
-listVisibleModuleNames dflags =
- map fst (filter visible (Map.toList (moduleNameProvidersMap (unitState dflags))))
+listVisibleModuleNames :: UnitState -> [ModuleName]
+listVisibleModuleNames state =
+ map fst (filter visible (Map.toList (moduleNameProvidersMap state)))
where visible (_, ms) = any originVisible (Map.elems ms)
-- | Lookup 'UnitInfo' for every preload unit, for every unit used to