1
1
mirror of https://github.com/github/semantic.git synced 2024-12-24 15:35:14 +03:00

Correct the before/after definitions to select the correct side.

This commit is contained in:
Rob Rix 2016-06-27 13:29:22 -04:00
parent aa5d6e4deb
commit ddc418bc57

View File

@ -20,11 +20,11 @@ data Patch a =
-- | Return the item from the after side of the patch.
after :: Patch a -> Maybe a
after = maybeFst . unPatch
after = maybeSnd . unPatch
-- | Return the item from the before side of the patch.
before :: Patch a -> Maybe a
before = maybeSnd . unPatch
before = maybeFst . unPatch
-- | Return both sides of a patch.
unPatch :: Patch a -> These a a