Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit b1eab33

Browse files
Actually realize that the dropEnd1 is old code and revert "Get rid of redundant dropEnd1"
This reverts commit 723d56c.
1 parent 723d56c commit b1eab33

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

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

Lines changed: 8 additions & 3 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 (nubOrd)
60+
import Data.List.Extra (dropEnd1, nubOrd)
6161

6262

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

281281
prettyNames <- mapM (prettyName locationsMap) names
282-
283-
pure (Just range, prettyNames ++ prettyTypes Nothing locationsMap)
282+
pure (Just range, prettyNames ++ pTypes locationsMap)
284283
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
289+
285290
range :: Range
286291
range = realSrcSpanToRange $ nodeSpan ast
287292

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /