1
1
mirror of https://github.com/github/semantic.git synced 2024-12-01 00:33:59 +03:00

Import Map qualified.

This commit is contained in:
Rob Rix 2015-11-30 16:17:24 -05:00
parent efee13fd63
commit 4a3c63473e

View File

@ -6,7 +6,7 @@ import Term
import Control.Monad.Free
import Control.Monad.State
import Data.Foldable (minimumBy)
import Data.Map
import qualified Data.Map as Map
import Data.Ord (comparing)
type Compare a annotation = Term a annotation -> Term a annotation -> Maybe (Diff a annotation)
@ -24,5 +24,5 @@ ses diffTerms cost (a : as) (b : bs) = case diffTerms a b of
sumCost script = sum $ cost <$> script
copy diff = diff : ses diffTerms cost as bs
diffAt :: (Integer, Integer) -> [(Term String Info)] -> [(Term String Info)] -> State (Map (Integer, Integer) [(Diff String Info, Integer)]) [Diff String Info]
diffAt :: (Integer, Integer) -> [(Term String Info)] -> [(Term String Info)] -> State (Map.Map (Integer, Integer) [(Diff String Info, Integer)]) [Diff String Info]
diffAt (i, j) as bs = _