Skip to content
This repository was archived by the owner on Aug 3, 2024. It is now read-only.

Commit f1a6a6c

Browse files
harpocratesalexbiehl
authored andcommitted
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.
1 parent 7fd659e commit f1a6a6c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

haddock-api/src/Haddock/Interface/AttachInstances.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ type ExportInfo = (ExportedNames, Modules)
5454
-- Also attaches fixities
5555
attachInstances :: ExportInfo -> [Interface] -> InstIfaceMap -> Ghc [Interface]
5656
attachInstances expInfo ifaces instIfaceMap = do
57-
(_msgs, mb_index) <- getNameToInstancesIndex
57+
(_msgs, mb_index) <- getNameToInstancesIndex (map ifaceMod ifaces)
5858
mapM (attach $ fromMaybe emptyNameEnv mb_index) ifaces
5959
where
6060
-- TODO: take an IfaceMap as input

0 commit comments

Comments
 (0)