1
1
mirror of https://github.com/github/semantic.git synced 2024-11-24 08:54:07 +03:00

Add an openMaybe function for quicker open/closed tests.

This commit is contained in:
Rob Rix 2015-12-22 17:02:34 -05:00
parent c643f2ed58
commit 208df10e1a

View File

@ -122,3 +122,6 @@ spec = do
leafWithRangesInSources sourceA sourceB rangeA rangeB = Free $ Annotated (Info rangeA mempty, Info rangeB mempty) (Leaf $ substring rangeA sourceA ++ substring rangeB sourceB)
openString string = const string <$> openRange string (totalRange string)
openMaybe :: Maybe String -> Maybe (Maybe String)
openMaybe (Just a) = Just (Just a)
openMaybe Nothing = Nothing