From d912ee70fff0718440a6f281ccea73aaf8568685 Mon Sep 17 00:00:00 2001 From: Alex Biehl Date: Sun, 4 Jun 2017 11:56:38 +0200 Subject: Use NameSet for isExported check (#632) --- haddock-api/src/Haddock/Interface/Create.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'haddock-api') 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 -- cgit v1.2.3