diff --git a/src/Patch.hs b/src/Patch.hs index c6e7aa627..8c38c0939 100644 --- a/src/Patch.hs +++ b/src/Patch.hs @@ -5,7 +5,6 @@ module Patch , after , before , unPatch -, patchSum , maybeFst , maybeSnd , mapPatch @@ -47,10 +46,6 @@ mapPatch f _ (Delete a ) = Delete (f a) mapPatch _ g (Insert b) = Insert (g b) mapPatch f g (Replace a b) = Replace (f a) (g b) --- | Calculate the cost of the patch given a function to compute the cost of a item. -patchSum :: (a -> Int) -> Patch a -> Int -patchSum termCost patch = maybe 0 termCost (before patch) + maybe 0 termCost (after patch) - -- | Return Just the value in This, or the first value in These, if any. maybeFst :: These a b -> Maybe a maybeFst = these Just (const Nothing) ((Just .) . const)