Skip to content

Commit 6e9125f

Browse files
committed
remove nub
1 parent 808cec8 commit 6e9125f

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

ghcide/src/Development/IDE/Core/Tracing.hs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -100,18 +100,19 @@ performMeasurement logger stateRef instrumentFor mapCountInstrument = do
100100
withSpan_ "Measure length" $ readVar stateRef >>= observe mapCountInstrument . length
101101

102102
values <- readVar stateRef
103-
let keys = nub
104-
$ Key GhcSession : Key GhcSessionDeps
105-
: [ k | (_,k) <- HMap.keys values
103+
let keys = Key GhcSession
104+
: Key GhcSessionDeps
105+
: [ k | (_,k) <- HMap.keys values
106106
-- do GhcSessionIO last since it closes over stateRef itself
107-
, k /= Key GhcSessionIO]
108-
++ [Key GhcSessionIO]
107+
, k /= Key GhcSession
108+
, k /= Key GhcSessionDeps
109+
, k /= Key GhcSessionIO
110+
] ++ [Key GhcSessionIO]
109111
!groupedForSharing <- evaluate (keys `using` seqList r0)
110112
measureMemory logger [groupedForSharing] instrumentFor stateRef
111113
`catch` \(e::SomeException) ->
112114
logInfo logger ("MEMORY PROFILING ERROR: " <> fromString (show e))
113115

114-
{-# ANN startTelemetry ("HLint: ignore Use nubOrd" :: String) #-}
115116

116117
type OurValueObserver = Int -> IO ()
117118

0 commit comments

Comments
 (0)