Skip to content

Commit 39d6823

Browse files
author
Mitsutoshi Aoe
committed
Fix warning about the use of a deprecated function
1 parent abf8146 commit 39d6823

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

Events/HECs.hs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,14 @@ import Events.SparkTree
1616
import GHC.RTS.Events
1717

1818
import Data.Array
19-
import qualified Data.IntMap as IM
2019
import qualified Data.List as L
2120

21+
#if MIN_VERSION_containers(0,5,0)
22+
import qualified Data.IntMap.Strict as IM
23+
#else
24+
import qualified Data.IntMap as IM
25+
#endif
26+
2227
-----------------------------------------------------------------------------
2328

2429
-- all the data from a .eventlog file
@@ -78,7 +83,9 @@ fromListWith' :: (a -> a -> a) -> [(Int, a)] -> IM.IntMap a
7883
fromListWith' f xs =
7984
L.foldl' ins IM.empty xs
8085
where
81-
#if MIN_VERSION_containers(0,4,1)
86+
#if MIN_VERSION_containers(0,5,0)
87+
ins t (k,x) = IM.insertWith f k x t
88+
#elif MIN_VERSION_containers(0,4,1)
8289
ins t (k,x) = IM.insertWith' f k x t
8390
#else
8491
ins t (k,x) =

0 commit comments

Comments
 (0)