1
1
mirror of https://github.com/github/semantic.git synced 2024-12-01 09:15:01 +03:00

LambdaCase.

This commit is contained in:
Rob Rix 2019-10-18 12:11:19 -04:00
parent 38cff494e7
commit 0764de8320
No known key found for this signature in database
GPG Key ID: F188A01508EA1CF7

View File

@ -47,7 +47,7 @@ instance Bitraversable Edit where
Compare a b -> Compare <$> f a <*> g b
instance Eq2 Edit where
liftEq2 eqBefore eqAfter p1 p2 = case (p1, p2) of
liftEq2 eqBefore eqAfter = curry $ \case
(Delete a1, Delete a2) -> eqBefore a1 a2
(Insert b1, Insert b2) -> eqAfter b1 b2
(Compare a1 b1, Compare a2 b2) -> eqBefore a1 a2 && eqAfter b1 b2