mirror of
https://github.com/github/semantic.git
synced 2025-01-01 11:46:14 +03:00
Stub in a diffAt function.
This commit is contained in:
parent
71dccbdf6e
commit
efee13fd63
@ -4,7 +4,9 @@ import Patch
|
|||||||
import Diff
|
import Diff
|
||||||
import Term
|
import Term
|
||||||
import Control.Monad.Free
|
import Control.Monad.Free
|
||||||
|
import Control.Monad.State
|
||||||
import Data.Foldable (minimumBy)
|
import Data.Foldable (minimumBy)
|
||||||
|
import Data.Map
|
||||||
import Data.Ord (comparing)
|
import Data.Ord (comparing)
|
||||||
|
|
||||||
type Compare a annotation = Term a annotation -> Term a annotation -> Maybe (Diff a annotation)
|
type Compare a annotation = Term a annotation -> Term a annotation -> Maybe (Diff a annotation)
|
||||||
@ -21,3 +23,6 @@ ses diffTerms cost (a : as) (b : bs) = case diffTerms a b of
|
|||||||
insert = (Pure . Insert $ b) : ses diffTerms cost (a : as) bs
|
insert = (Pure . Insert $ b) : ses diffTerms cost (a : as) bs
|
||||||
sumCost script = sum $ cost <$> script
|
sumCost script = sum $ cost <$> script
|
||||||
copy diff = diff : ses diffTerms cost as bs
|
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 (i, j) as bs = _
|
||||||
|
Loading…
Reference in New Issue
Block a user