Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prefer Data.HashSet.member to Data.Foldable.elem #2886

Merged
merged 3 commits into from
May 2, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,6 @@ extendImportViaParent df parent child (L l it@ImportDecl{..})
listAnn = epAnn srcParent [AddEpAnn AnnOpenP (epl 1), AddEpAnn AnnCloseP (epl 0)]
x :: LIE GhcPs = reLocA $ L l'' $ IEThingWith listAnn parentLIE NoIEWildcard [childLIE]

let hasSibling = not (null pre)
lies' <- addCommaInImportList (reverse pre) x
#endif
return $ L l it{ideclHiding = Just (hide, L l' lies')}
Expand Down
2 changes: 1 addition & 1 deletion plugins/hls-rename-plugin/src/Ide/Plugin/Rename.hs
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ renameRefs newName refs = everywhere $ mkT replaceLoc
replace _ = Unqual newName

isRef :: SrcSpan -> Bool
isRef = (`elem` refs) . unsafeSrcSpanToLoc
isRef = (`HS.member` refs) . unsafeSrcSpanToLoc

---------------------------------------------------------------------------------------------------
-- Reference finding
Expand Down