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

Implement the Show instance for Row manually.

This commit is contained in:
Rob Rix 2015-12-07 11:49:35 -05:00
parent 3a0479f3fe
commit 78d077b2fd

View File

@ -50,7 +50,10 @@ split :: Diff a Info -> String -> String -> IO ByteString
split diff before after = return . pack . show $ diffToRows diff (0, 0) before after
data Row = Row [HTML] [HTML]
deriving (Eq, Show)
deriving Eq
instance Show Row where
show (Row left right) = tag "tr" (tag "td" $ show <$> left) (tag "td" $ show <$> right)
bimap :: ([HTML] -> [HTML]) -> ([HTML] -> [HTML]) -> Row -> Row
bimap f g (Row a b) = Row (f a) (g b)