1
1
mirror of https://github.com/github/semantic.git synced 2024-12-18 20:31:55 +03:00

Rephrase the Show instance for Maybe ClassName as a showClassName function.

This commit is contained in:
Rob Rix 2015-12-07 11:39:48 -05:00
parent 7abeee0671
commit ca753e76ac

View File

@ -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