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:
parent
558a0a9328
commit
256d8f07e8
11 changed files with 24 additions and 26 deletions
|
@ -24,7 +24,7 @@ import Git
|
|||
import Git.Command
|
||||
import qualified Git.UpdateIndex
|
||||
|
||||
import qualified Data.Map as M
|
||||
import qualified Data.Map.Strict as M
|
||||
|
||||
{- Queable actions that can be performed in a git repository. -}
|
||||
data Action
|
||||
|
@ -117,7 +117,7 @@ updateQueue !action different sizeincrease q repo
|
|||
, items = newitems
|
||||
}
|
||||
!newsize = size q' + sizeincrease
|
||||
!newitems = M.insertWith' combineNewOld (actionKey action) action (items q')
|
||||
!newitems = M.insertWith combineNewOld (actionKey action) action (items q')
|
||||
|
||||
combineNewOld :: Action -> Action -> Action
|
||||
combineNewOld (CommandAction _sc1 _ps1 fs1) (CommandAction sc2 ps2 fs2) =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue