1
1
mirror of https://github.com/github/semantic.git synced 2024-12-29 18:06:14 +03:00

Put the branch/leaf/info DSL at the top level.

This commit is contained in:
Rob Rix 2016-04-01 10:15:48 -04:00
parent 9c706c05e2
commit 63e33f54cc

View File

@ -112,11 +112,11 @@ spec = parallel $ do
leafWithRangesInSources sources ranges = Free $ Annotated (Info <$> ranges <*> pure mempty) (Leaf $ runBothWith (++) (toString <$> sources))
branch :: annotation -> [Free (Annotated String annotation) patch] -> Free (Annotated String annotation) patch
branch annotation = Free . Annotated annotation . Indexed
branch :: annotation -> [Free (Annotated String annotation) patch] -> Free (Annotated String annotation) patch
branch annotation = Free . Annotated annotation . Indexed
leaf :: annotation -> String -> Free (Annotated String annotation) patch
leaf info = Free . Annotated info . Leaf
leaf :: annotation -> String -> Free (Annotated String annotation) patch
leaf info = Free . Annotated info . Leaf
info :: Int -> Int -> Info
info = ((`Info` mempty) .) . Range
info :: Int -> Int -> Info
info = ((`Info` mempty) .) . Range