Skip to content

Commit

Permalink
Fix warning about the use of a deprecated function
Browse files Browse the repository at this point in the history
  • Loading branch information
Mitsutoshi Aoe committed Jul 13, 2017
1 parent abf8146 commit 39d6823
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions Events/HECs.hs
Expand Up @@ -16,9 +16,14 @@ import Events.SparkTree
import GHC.RTS.Events

import Data.Array
import qualified Data.IntMap as IM
import qualified Data.List as L

#if MIN_VERSION_containers(0,5,0)
import qualified Data.IntMap.Strict as IM
#else
import qualified Data.IntMap as IM
#endif

-----------------------------------------------------------------------------

-- all the data from a .eventlog file
Expand Down Expand Up @@ -78,7 +83,9 @@ fromListWith' :: (a -> a -> a) -> [(Int, a)] -> IM.IntMap a
fromListWith' f xs =
L.foldl' ins IM.empty xs
where
#if MIN_VERSION_containers(0,4,1)
#if MIN_VERSION_containers(0,5,0)
ins t (k,x) = IM.insertWith f k x t
#elif MIN_VERSION_containers(0,4,1)
ins t (k,x) = IM.insertWith' f k x t
#else
ins t (k,x) =
Expand Down

0 comments on commit 39d6823

Please sign in to comment.