Skip to content

Commit 753b8e7

Browse files
committed
Get rid of redundant dropEnd1
1 parent 72f866f commit 753b8e7

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

ghcide/src/Development/IDE/Spans/AtPoint.hs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ import qualified Data.Text as T
5757

5858
import qualified Data.Array as A
5959
import Data.Either
60-
import Data.List.Extra (dropEnd1, nubOrd)
60+
import Data.List.Extra (nubOrd)
6161

6262

6363
import Control.Lens ((^.))
@@ -279,14 +279,9 @@ atPoint opts@IdeOptions{} shakeExtras@ShakeExtras{ withHieDb, hiedbWriter } har@
279279
Left _moduleName -> Nothing) $ fromMaybe [] locationsWithIdentifier
280280

281281
prettyNames <- mapM (prettyName locationsMap) names
282-
pure (Just range, prettyNames ++ pTypes locationsMap)
283-
where
284-
pTypes :: M.Map Name Location -> [T.Text]
285-
pTypes locationsMap =
286-
case names of
287-
[_singleName] -> dropEnd1 $ prettyTypes Nothing locationsMap
288-
_ -> prettyTypes Nothing locationsMap
289282

283+
pure (Just range, prettyNames ++ prettyTypes Nothing locationsMap)
284+
where
290285
range :: Range
291286
range = realSrcSpanToRange $ nodeSpan ast
292287

0 commit comments

Comments
 (0)