aboutsummaryrefslogtreecommitdiff
path: root/haddock-api/src/Haddock/Interface
diff options
context:
space:
mode:
authorAlec Theriault <alec.theriault@gmail.com>2018-01-06 08:20:43 -0800
committerAlexander Biehl <alexbiehl@gmail.com>2018-02-01 14:58:18 +0100
commitf1a6a6c9c0538fc329054d4fb4d717371d456886 (patch)
treefe7e7c0b5f07b5ca5272a0c82f489394df14afda /haddock-api/src/Haddock/Interface
parent7fd659e1998bf5d1d1665c741a6d82086ef00eab (diff)
Pass to GHC visible modules for instance filtering
The GHC-side `getNameToInstancesIndex` filters out incorrectly some instances because it is not aware of what modules are visible. On the Haddock side, we need to pass in the modules we are processing. On the GHC side, we need to check against _those_ modules when checking if an instance is visible.
Diffstat (limited to 'haddock-api/src/Haddock/Interface')
-rw-r--r--haddock-api/src/Haddock/Interface/AttachInstances.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/haddock-api/src/Haddock/Interface/AttachInstances.hs b/haddock-api/src/Haddock/Interface/AttachInstances.hs
index 2231ce7e..4fd9d264 100644
--- a/haddock-api/src/Haddock/Interface/AttachInstances.hs
+++ b/haddock-api/src/Haddock/Interface/AttachInstances.hs
@@ -54,7 +54,7 @@ type ExportInfo = (ExportedNames, Modules)
-- Also attaches fixities
attachInstances :: ExportInfo -> [Interface] -> InstIfaceMap -> Ghc [Interface]
attachInstances expInfo ifaces instIfaceMap = do
- (_msgs, mb_index) <- getNameToInstancesIndex
+ (_msgs, mb_index) <- getNameToInstancesIndex (map ifaceMod ifaces)
mapM (attach $ fromMaybe emptyNameEnv mb_index) ifaces
where
-- TODO: take an IfaceMap as input