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:
parent
cf1440a81c
commit
d76fbfa60e
@ -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
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user