1
1
mirror of https://github.com/github/semantic.git synced 2024-11-28 18:23:44 +03:00

More alignment.

This commit is contained in:
Rob Rix 2019-10-18 12:12:29 -04:00
parent f870e977ff
commit b3e6f527a3
No known key found for this signature in database
GPG Key ID: F188A01508EA1CF7

View File

@ -49,7 +49,7 @@ instance Bitraversable Edit where
instance Eq2 Edit where
liftEq2 eql eqr = curry $ \case
(Delete a1 , Delete a2 ) -> eql a1 a2
(Insert b1, Insert b2) -> eqr b1 b2
(Insert b1, Insert b2) -> eqr b1 b2
(Compare a1 b1, Compare a2 b2) -> eql a1 a2 && eqr b1 b2
_ -> False
@ -57,7 +57,7 @@ instance Ord2 Edit where
liftCompare2 cmpl cmpr = curry $ \case
(Delete a1 , Delete a2 ) -> cmpl a1 a2
(Delete _ , _ ) -> LT
(Insert b1, Insert b2) -> cmpr b1 b2
(Insert b1, Insert b2) -> cmpr b1 b2
(Insert _ , _ ) -> LT
(Compare a1 b1, Compare a2 b2) -> cmpl a1 a2 <> cmpr b1 b2
_ -> GT