1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 14:54:16 +03:00

The line isn’t gonna get any closeder.

This commit is contained in:
Rob Rix 2016-03-10 17:40:01 -05:00
parent 736e7b95c7
commit 186337fd4d

View File

@ -46,7 +46,7 @@ maybeFirst = foldr (const . Just) Nothing
-- | Merge or prepend lines based on whether the left line is open or closed.
coalesceLines :: Line a -> Line a -> [Line a]
coalesceLines line nextLine | isOpen line = [line `mappend` nextLine]
| otherwise = [Closed (unLine line), nextLine]
| otherwise = [line, nextLine]
instance Applicative Line where
pure = Line . pure