Skip to content

Commit

Permalink
Prefer Data.HashSet.member to Data.Foldable.elem (haskell#2886)
Browse files Browse the repository at this point in the history
* Prefer Data.HashSet.member to Data.Foldable.elem

* Remove unused binding

Co-authored-by: Pepe Iborra <pepeiborra@gmail.com>
  • Loading branch information
2 people authored and sloorush committed May 21, 2022
1 parent 25fba0e commit 7842379
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion ghcide/src/Development/IDE/Plugin/CodeAction/ExactPrint.hs
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

0 comments on commit 7842379

Please sign in to comment.