diff options
author | Alex Biehl <alexbiehl@gmail.com> | 2017-06-04 11:56:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-04 11:56:38 +0200 |
commit | d912ee70fff0718440a6f281ccea73aaf8568685 (patch) | |
tree | 82c187af06e30ed2a4b3c1398affa856f7946074 /haddock-api | |
parent | bfb3563f730fd1c973a6611a0fba3435fb1df489 (diff) |
Use NameSet for isExported check (#632)
Diffstat (limited to 'haddock-api')
-rw-r--r-- | haddock-api/src/Haddock/Interface/Create.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/haddock-api/src/Haddock/Interface/Create.hs b/haddock-api/src/Haddock/Interface/Create.hs index 98d4dbe8..36b0b7bb 100644 --- a/haddock-api/src/Haddock/Interface/Create.hs +++ b/haddock-api/src/Haddock/Interface/Create.hs @@ -50,6 +50,7 @@ import qualified SrcLoc import GHC import HscTypes import Name +import NameSet import Bag import RdrName import TcRnTypes @@ -651,9 +652,8 @@ mkExportItems sub_names = map fst subs' fixities = [ (n, f) | n <- name:sub_names, Just f <- [M.lookup n fixMap] ] - - isExported = (`elem` exportedNames) - + exportedNameSet = mkNameSet exportedNames + isExported n = elemNameSet n exportedNameSet findDecl :: Name -> ErrMsgGhc ([LHsDecl Name], (DocForDecl Name, [(Name, DocForDecl Name)])) findDecl n |