1
1
mirror of https://github.com/github/semantic.git synced 2025-01-04 21:47:07 +03:00

Document openRangePair.

This commit is contained in:
Rob Rix 2016-03-03 07:59:03 -05:00
parent f1b8e91723
commit 660cc1ad8b

View File

@ -117,6 +117,7 @@ diffRanges (Pure patch) = fmap (characterRange . copoint) <$> unPatch patch
openEither :: MaybeOpen a -> MaybeOpen b -> MaybeOpen (Either a b)
openEither ifLeft ifRight which = either (fmap (const which) . ifLeft) (fmap (const which) . ifRight) which
-- | MaybeOpen test for (Range, a) pairs.
openRangePair :: Source Char -> MaybeOpen (Range, a)
openRangePair source pair = pair <$ openRange source (Prelude.fst pair)