1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 06:41:45 +03:00

Revert "Explicitly preserve Closedness on both sides under mappend."

This reverts commit bd4094153350b67d383edffd1f22fbd97de81774.
This commit is contained in:
Rob Rix 2016-03-15 15:08:26 -04:00
parent 718b905375
commit 970a3b24d3

View File

@ -54,8 +54,7 @@ instance Applicative Line where
instance Monoid (Line a) where
mempty = Line []
mappend xs ys | isOpen xs && isOpen ys = Line (unLine xs `mappend` unLine ys)
| otherwise = Closed (unLine xs `mappend` unLine ys)
mappend xs ys = lineMap (mappend (unLine xs)) ys
instance Coalescent (Line a) where
coalesce a b | isOpen a = pure (a `mappend` b)