diff options
author | Alexander Biehl <alexbiehl@gmail.com> | 2017-10-08 15:32:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-08 15:32:28 +0200 |
commit | e498b7871bfbee8b38858b546390246ddddb9509 (patch) | |
tree | 916d06fd7dd24c607570f7a38796ceece2bbb70b /haddock-api/src/Haddock/Interface/AttachInstances.hs | |
parent | 527596cdec687f4dc03b3281a400158be60fe36d (diff) |
Precise Haddock: Use Avails for export resolution (#688)
* Use Avails for export resolution
* Support reexported modules
* Factor out availExportItem
* Use avails for fullModuleExports
* Don't use subMap in attachInstances
* lookupDocs without subMap
* Completely remove subMap
* Only calculate unqualified modules when explicit export list is given
* Refactor
* Refine comment
* return
* Fix
* Refactoring
* Split avail if declaration is not exported itself
* Move avail splitting
Diffstat (limited to 'haddock-api/src/Haddock/Interface/AttachInstances.hs')
-rw-r--r-- | haddock-api/src/Haddock/Interface/AttachInstances.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/haddock-api/src/Haddock/Interface/AttachInstances.hs b/haddock-api/src/Haddock/Interface/AttachInstances.hs index 0e5811b1..2231ce7e 100644 --- a/haddock-api/src/Haddock/Interface/AttachInstances.hs +++ b/haddock-api/src/Haddock/Interface/AttachInstances.hs @@ -118,12 +118,12 @@ attachToExportItem index expInfo iface ifaceMap instIfaceMap export = where attachFixities e@ExportDecl{ expItemDecl = L _ d , expItemPats = patsyns + , expItemSubDocs = subDocs } = e { expItemFixities = nubByName fst $ expItemFixities e ++ [ (n',f) | n <- getMainDeclBinder d - , Just subs <- [instLookup instSubMap n iface ifaceMap instIfaceMap <|> Just []] - , n' <- n : (subs ++ patsyn_names) - , Just f <- [instLookup instFixMap n' iface ifaceMap instIfaceMap] + , n' <- n : (map fst subDocs ++ patsyn_names) + , Just f <- [instLookup instFixMap n' iface ifaceMap instIfaceMap] ] } where patsyn_names = concatMap (getMainDeclBinder . fst) patsyns |