aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Pretty.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Text/Pandoc/Pretty.hs')
-rw-r--r--src/Text/Pandoc/Pretty.hs6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/Text/Pandoc/Pretty.hs b/src/Text/Pandoc/Pretty.hs
index f3ef0ef10..e830a1e78 100644
--- a/src/Text/Pandoc/Pretty.hs
+++ b/src/Text/Pandoc/Pretty.hs
@@ -208,8 +208,7 @@ chomp d = Doc (fromList dl')
go (Prefixed s d' : xs) = Prefixed s (chomp d') : xs
go xs = xs
-outp :: (IsString a, Monoid a)
- => Int -> String -> DocState a
+outp :: (IsString a) => Int -> String -> DocState a
outp off s | off < 0 = do -- offset < 0 means newline characters
st' <- get
let rawpref = prefix st'
@@ -234,8 +233,7 @@ outp off s = do -- offset >= 0 (0 might be combining char)
-- | Renders a 'Doc'. @render (Just n)@ will use
-- a line length of @n@ to reflow text on breakable spaces.
-- @render Nothing@ will not reflow text.
-render :: (Monoid a, IsString a)
- => Maybe Int -> Doc -> a
+render :: (IsString a) => Maybe Int -> Doc -> a
render linelen doc = fromString . mconcat . reverse . output $
execState (renderDoc doc) startingState
where startingState = RenderState{