diff options
author | Alec Theriault <alec.theriault@gmail.com> | 2018-01-06 08:20:43 -0800 |
---|---|---|
committer | Alec Theriault <alec.theriault@gmail.com> | 2018-01-06 08:20:43 -0800 |
commit | b9bf41f6a25239bb2c0780d146ba1f18c061d6d3 (patch) | |
tree | 1925d8d5c92a2085752e6c574b0b32d0f4a86951 /haddock-api | |
parent | 24841386cff6fdccc11accf9daa815c2c7444d65 (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')
-rw-r--r-- | haddock-api/src/Haddock/Interface/AttachInstances.hs | 2 |
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 |