packages feed

myers-diff 0.3.0.0 → 0.3.0.1

raw patch · 4 files changed

+13/−7 lines, 4 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -2,6 +2,10 @@  ## Unreleased +## 0.3.0.1++* Fix compatibility with `text-2.1.2` (#13)+ ## 0.3.0.0  * Fix quadratic `Text` -> `Vector` conversion.
myers-diff.cabal view
@@ -1,11 +1,11 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.36.0.+-- This file has been generated from package.yaml by hpack version 0.37.0. -- -- see: https://github.com/sol/hpack  name:           myers-diff-version:        0.3.0.0+version:        0.3.0.1 description:    Please see the README on GitHub at <https://github.com/codedownio/myers-diff#readme> homepage:       https://github.com/codedownio/myers-diff#readme bug-reports:    https://github.com/codedownio/myers-diff/issues
src/Data/Diff/Myers.hs view
@@ -48,7 +48,8 @@ import qualified Data.Foldable as F import Data.Function import Data.Sequence as Seq-import Data.Text as T+import Data.Text (Text)+import qualified Data.Text as T import qualified Data.Text.Internal.Fusion as TI import Data.Vector.Unboxed as VU import Data.Vector.Unboxed.Mutable as VUM@@ -231,7 +232,7 @@     countNewlinesAndLastLineLength :: VU.Vector Char -> (Int, Int)     countNewlinesAndLastLineLength = VU.foldl' (\(tot, lastLineLength) ch -> if ch == '\n' then (tot + 1, 0) else (tot, lastLineLength + 1)) (0, 0) -    vectorToText :: VU.Vector Char -> T.Text+    vectorToText :: VU.Vector Char -> Text     vectorToText = T.pack . VU.toList  -- * Consolidate edits
test/Spec/VectorMyersSpec.hs view
@@ -5,8 +5,9 @@ module Spec.VectorMyersSpec (spec) where  import Control.Monad.Catch (MonadThrow)-import Data.Diff.Types+import Control.Monad.IO.Class import Data.Diff.Myers+import Data.Diff.Types import Data.Text as T import Test.Sandwich import Test.Sandwich.QuickCheck@@ -61,7 +62,7 @@       prop "Multiple changes" $ \(DocMultiInsertOrDelete (from, to)) -> verifyDiff from to  -checkDiff :: MonadThrow m => Text -> Text -> [ChangeEvent] -> SpecFree context m ()+checkDiff :: (MonadThrow m, MonadIO m) => Text -> Text -> [ChangeEvent] -> SpecFree context m () checkDiff from to changes = it (show from <> " -> " <> show to) $ do   -- Check that the given changes actually work   applyChangesText changes from `shouldBe` to@@ -69,7 +70,7 @@   -- Diff produces the desired changse   diffTextsToChangeEvents from to `shouldBe` changes -checkDiffConsolidated :: MonadThrow m => Text -> Text -> [ChangeEvent] -> SpecFree context m ()+checkDiffConsolidated :: (MonadThrow m, MonadIO m) => Text -> Text -> [ChangeEvent] -> SpecFree context m () checkDiffConsolidated from to changes = it (show from <> " -> " <> show to <> " (consolidated)") $ do   -- Check that the given changes actually work   applyChangesText changes from `shouldBe` to