avoid insertWith' depreaction warning

Switch to Data.Map.Strict everywhere that used it.

There are still lots of lazy maps in git-annex. I think switching these
is safe. The risk is that there might be a map that is used in a way
that relies on the values not being evaluated to WHNF, and switching to
strict might result in bad performance or memory use. So, I have not
switched everything.
This commit is contained in:
Joey Hess 2018-04-22 13:28:31 -04:00
parent 558a0a9328
commit 256d8f07e8
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
11 changed files with 24 additions and 26 deletions

View file

@ -25,7 +25,7 @@ import Foreign.C.Types
import Foreign.C.Error
import Foreign.Ptr
import Foreign.Marshal
import qualified Data.Map as M
import qualified Data.Map.Strict as M
import qualified Data.Set as S
import qualified System.Posix.Files as Files
import Control.Concurrent
@ -212,7 +212,7 @@ handleChange kq@(Kqueue _ _ dirmap pruner) fd olddirinfo =
newmap' <- foldM removeSubDir newmap (map changedFile deleted)
-- Update the cached dirinfo just looked up.
let newmap'' = M.insertWith' const fd newdirinfo newmap'
let newmap'' = M.insert fd newdirinfo newmap'
-- When new directories were added, need to update
-- the kqueue to watch them.