From f09f9cf3a28f8a909da6567bfdc2ed3c9c873b79 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Fri, 20 May 2016 22:03:13 -0400 Subject: [PATCH] Extract showThese to the top. --- test/AlignmentSpec.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/AlignmentSpec.hs b/test/AlignmentSpec.hs index f34894089..3be415e4e 100644 --- a/test/AlignmentSpec.hs +++ b/test/AlignmentSpec.hs @@ -229,9 +229,11 @@ instance Show Child where instance Show BranchElement where show (Child' key contents) = showThese (showContents <$> contents) where showContents contents = "(" ++ key ++ contents ++ ")" - showThese = these (('<':) . show) (('>':) . show) (\ a b -> a ++ " | " ++ b) . runJoin show (Margin contents) = show contents +showThese :: Join These String -> String +showThese = these (('<':) . show) (('>':) . show) (\ a b -> a ++ " | " ++ b) . runJoin + counts :: [Join These (Int, a)] -> Both Int counts numbered = fromMaybe 0 . getLast . mconcat . fmap Last <$> Join (unalign (runJoin . fmap Prelude.fst <$> numbered))