From ca753e76acd3bd03ce3cf2d9f1de20a0d3ace454 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Mon, 7 Dec 2015 11:39:48 -0500 Subject: [PATCH] Rephrase the Show instance for Maybe ClassName as a showClassName function. --- src/Split.hs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Split.hs b/src/Split.hs index d4c1f6d6d..c241274e6 100644 --- a/src/Split.hs +++ b/src/Split.hs @@ -24,9 +24,10 @@ data HTML = | Dt String deriving (Eq, Show) -instance Show (Maybe ClassName) where - show (Just c) = " class='" ++ c ++ "'" - show _ = "" +showClassName :: Maybe ClassName -> String +showClassName (Just c) = " class='" ++ c ++ "'" +showClassName _ = "" + split :: Diff a Info -> String -> String -> IO ByteString split diff before after = return . pack . show $ diffToRows diff (0, 0) before after