From ce9be615a621cd862bb98d1296cfdb2a3b89f584 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Mon, 25 Apr 2016 15:04:55 -0400 Subject: [PATCH] Turn the bind around. --- test/AlignmentSpec.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/AlignmentSpec.hs b/test/AlignmentSpec.hs index 03d813729..0175c7df3 100644 --- a/test/AlignmentSpec.hs +++ b/test/AlignmentSpec.hs @@ -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