File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -604,12 +604,18 @@ instance Diffable LitTok where
604
604
(" Char" , CharTok s) | fromString s == (val ! " fields" ! 0 ) -> pure ()
605
605
(" Integer" , IntegerTok s) | fromString s == (val ! " fields" ! 0 ) -> pure ()
606
606
(" Float" , FloatTok s) | fromString s == (val ! " fields" ! 0 ) -> pure ()
607
- (" Str_" , StrTok s) | fromString s == (val ! " fields" ! 0 ) -> pure ()
608
- (" StrRaw" , StrRawTok s i) | fromString s == (val ! " fields" ! 0 ) -> i === (val ! " fields" ! 1 )
609
- (" ByteStr" , ByteStrTok s) | fromString s == (val ! " fields" ! 0 ) -> pure ()
610
- (" ByteStrRaw" , ByteStrRawTok s i) | fromString s == (val ! " fields" ! 0 ) -> i === (val ! " fields" ! 1 )
607
+ (" Str_" , StrTok s) | fromString s == clean (val ! " fields" ! 0 ) -> pure ()
608
+ (" StrRaw" , StrRawTok s i) | fromString s == clean (val ! " fields" ! 0 ) -> i === (val ! " fields" ! 1 )
609
+ (" ByteStr" , ByteStrTok s) | fromString s == clean (val ! " fields" ! 0 ) -> pure ()
610
+ (" ByteStrRaw" , ByteStrRawTok s i) | fromString s == clean (val ! " fields" ! 0 ) -> i === (val ! " fields" ! 1 )
611
611
_ -> diff " different literal token" l val
612
612
613
+ clean :: Value -> Value
614
+ clean x =
615
+ case x of
616
+ String s -> String (T. replace " \r\n " " \n " s)
617
+ _ -> x
618
+
613
619
instance Show a => Diffable (FieldPat a ) where
614
620
f@ (FieldPat mi p _) === val = do
615
621
-- Extract the identifier and whether the pattern is shorthand
You can’t perform that action at this time.
0 commit comments