diff --git a/semantic-diff.cabal b/semantic-diff.cabal index 66e2e9266..0d99dfc5d 100644 --- a/semantic-diff.cabal +++ b/semantic-diff.cabal @@ -31,6 +31,7 @@ library , Data.Record , Data.Source , Data.Span + , Data.SplitDiff , Data.Syntax , Data.Syntax.Algebra , Data.Syntax.Assignment @@ -76,7 +77,6 @@ library , Semantic.Util , SemanticCmdLine , SES - , SplitDiff , Syntax , TreeSitter build-depends: base >= 4.8 && < 5 diff --git a/src/Alignment.hs b/src/Alignment.hs index 8164e85ae..9fd5d0b63 100644 --- a/src/Alignment.hs +++ b/src/Alignment.hs @@ -24,14 +24,14 @@ import Data.List (partition, sortBy) import Data.Maybe (catMaybes, fromJust, listToMaybe) import Data.Patch import Data.Range +import Data.Record import Data.Semigroup ((<>)) import Data.Source -import Data.Record +import Data.SplitDiff import Data.Term import Data.These import Info (byteRange, setByteRange) import Prelude hiding (fst, snd) -import SplitDiff -- | Assign line numbers to the lines on each side of a list of rows. numberedRows :: [Join These a] -> [Join These (Int, a)] diff --git a/src/SplitDiff.hs b/src/Data/SplitDiff.hs similarity index 96% rename from src/SplitDiff.hs rename to src/Data/SplitDiff.hs index 6f5dedbd5..1bcd6a249 100644 --- a/src/SplitDiff.hs +++ b/src/Data/SplitDiff.hs @@ -1,4 +1,4 @@ -module SplitDiff where +module Data.SplitDiff where import Control.Monad.Free import Data.Record diff --git a/src/Renderer/Patch.hs b/src/Renderer/Patch.hs index 586d2a48b..855a2647d 100644 --- a/src/Renderer/Patch.hs +++ b/src/Renderer/Patch.hs @@ -22,9 +22,9 @@ import Data.Range import Data.Record import Data.Semigroup ((<>)) import Data.Source +import Data.SplitDiff import Data.These import Prelude hiding (fst, snd) -import SplitDiff -- | Render a timed out file as a truncated diff. truncatePatch :: Both Blob -> ByteString diff --git a/test/AlignmentSpec.hs b/test/AlignmentSpec.hs index 03c6ef960..8343c3af3 100644 --- a/test/AlignmentSpec.hs +++ b/test/AlignmentSpec.hs @@ -18,10 +18,10 @@ import Data.Range import Data.Record import Data.Semigroup ((<>)) import qualified Data.Source as Source +import Data.SplitDiff import Data.Term import qualified Data.Text as Text import Data.These -import SplitDiff import Syntax import Test.Hspec (Spec, describe, it, parallel) import Test.Hspec.Expectations.Pretty