1
1
mirror of https://github.com/github/semantic.git synced 2025-01-04 13:34:31 +03:00

No IO needed

This commit is contained in:
Matt Diephouse 2016-01-28 16:14:24 -05:00
parent cf1440a81c
commit d76fbfa60e
2 changed files with 3 additions and 3 deletions

View File

@ -65,7 +65,7 @@ printDiff arguments diff sources = case format arguments of
put chunks = do put chunks = do
renderer <- byteStringMakerFromEnvironment renderer <- byteStringMakerFromEnvironment
B1.putStr $ mconcat $ chunksToByteStrings renderer chunks B1.putStr $ mconcat $ chunksToByteStrings renderer chunks
Split -> put (output arguments) =<< split diff sources Split -> put (output arguments) $ split diff sources
where where
put Nothing rendered = TextIO.putStr rendered put Nothing rendered = TextIO.putStr rendered
put (Just path) rendered = do put (Just path) rendered = do

View File

@ -31,8 +31,8 @@ type ClassName = T.Text
classifyMarkup :: Foldable f => f String -> Markup -> Markup classifyMarkup :: Foldable f => f String -> Markup -> Markup
classifyMarkup categories element = maybe element ((element !) . A.class_ . stringValue . ("category-" ++)) $ maybeFirst categories classifyMarkup categories element = maybe element ((element !) . A.class_ . stringValue . ("category-" ++)) $ maybeFirst categories
split :: Renderer leaf (IO TL.Text) split :: Renderer leaf TL.Text
split diff (before, after) = return . renderHtml split diff (before, after) = renderHtml
. docTypeHtml . docTypeHtml
. ((head $ link ! A.rel "stylesheet" ! A.href "style.css") <>) . ((head $ link ! A.rel "stylesheet" ! A.href "style.css") <>)
. body . body