mirror of
https://github.com/github/semantic.git
synced 2025-01-01 19:55:34 +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
|
||||
renderer <- byteStringMakerFromEnvironment
|
||||
B1.putStr $ mconcat $ chunksToByteStrings renderer chunks
|
||||
Split -> put (output arguments) =<< split diff sources
|
||||
Split -> put (output arguments) $ split diff sources
|
||||
where
|
||||
put Nothing rendered = TextIO.putStr rendered
|
||||
put (Just path) rendered = do
|
||||
|
@ -31,8 +31,8 @@ type ClassName = T.Text
|
||||
classifyMarkup :: Foldable f => f String -> Markup -> Markup
|
||||
classifyMarkup categories element = maybe element ((element !) . A.class_ . stringValue . ("category-" ++)) $ maybeFirst categories
|
||||
|
||||
split :: Renderer leaf (IO TL.Text)
|
||||
split diff (before, after) = return . renderHtml
|
||||
split :: Renderer leaf TL.Text
|
||||
split diff (before, after) = renderHtml
|
||||
. docTypeHtml
|
||||
. ((head $ link ! A.rel "stylesheet" ! A.href "style.css") <>)
|
||||
. body
|
||||
|
Loading…
Reference in New Issue
Block a user