mirror of
https://github.com/github/semantic.git
synced 2024-12-25 07:55:12 +03:00
Turn the bind around.
This commit is contained in:
parent
632d2cf86b
commit
ce9be615a6
@ -111,7 +111,7 @@ data PrettyDiff = PrettyDiff { unPrettySources :: Both (Source.Source Char), unP
|
||||
deriving Eq
|
||||
|
||||
instance Show PrettyDiff where
|
||||
show (PrettyDiff sources lines) = ('\n':) =<< (showLine (fromMaybe 0 (maximum (fmap length <$> shownLines))) <$> catMaybes shownLines)
|
||||
show (PrettyDiff sources lines) = showLine (fromMaybe 0 (maximum (fmap length <$> shownLines))) <$> catMaybes shownLines >>= ('\n':)
|
||||
where shownLines = toBoth <$> lines
|
||||
showLine n line = let (before, after) = fromThese (replicate n ' ') (replicate n ' ') (runJoin (pad n <$> line)) in
|
||||
before ++ " | " ++ after
|
||||
|
Loading…
Reference in New Issue
Block a user