@@ -9,6 +9,7 @@ module Ormolu.Diff
12+import BasicTypes (SourceText)
12import Data.Generics
13import Data.Generics
14import Ormolu.CommentStream
15import Ormolu.CommentStream
@@ -33,7 +34,10 @@ matchIgnoringSrcSpans = genericQuery
34 genericQuery :: GenericQ (GenericQ Bool)
35 genericQuery :: GenericQ (GenericQ Bool)
35 genericQuery x y = (toConstr x == toConstr y)
36 genericQuery x y = (toConstr x == toConstr y)
36− && and (gzipWithQ (genericQuery `extQ` srcSpanEq `extQ` hsModuleEq) x y)
37+ && and (gzipWithQ (genericQuery
40+ `extQ` sourceTextEq) x y)
38 srcSpanEq :: SrcSpan -> GenericQ Bool
42 srcSpanEq :: SrcSpan -> GenericQ Bool
39 srcSpanEq _ _ = True
43 srcSpanEq _ _ = True
@@ -46,3 +50,6 @@ matchIgnoringSrcSpans = genericQuery
46 matchIgnoringSrcSpans
50 matchIgnoringSrcSpans
47 hs0 { hsmodImports = sortImports (hsmodImports hs0) }
51 hs0 { hsmodImports = sortImports (hsmodImports hs0) }
48 hs1 { hsmodImports = sortImports (hsmodImports hs1) }
52 hs1 { hsmodImports = sortImports (hsmodImports hs1) }
54+ sourceTextEq :: SourceText -> GenericQ Bool
55+ sourceTextEq _ _ = True