diff options
Diffstat (limited to 'Text/Pandoc/Writers')
-rw-r--r-- | Text/Pandoc/Writers/ConTeXt.hs | 2 | ||||
-rw-r--r-- | Text/Pandoc/Writers/Docbook.hs | 2 | ||||
-rw-r--r-- | Text/Pandoc/Writers/HTML.hs | 5 | ||||
-rw-r--r-- | Text/Pandoc/Writers/Markdown.hs | 2 | ||||
-rw-r--r-- | Text/Pandoc/Writers/RTF.hs | 2 |
5 files changed, 6 insertions, 7 deletions
diff --git a/Text/Pandoc/Writers/ConTeXt.hs b/Text/Pandoc/Writers/ConTeXt.hs index a085c5bce..f3e8a839a 100644 --- a/Text/Pandoc/Writers/ConTeXt.hs +++ b/Text/Pandoc/Writers/ConTeXt.hs @@ -162,7 +162,7 @@ blockToConTeXt (OrderedList (start, style', delim) lst) = do let width = maximum $ map length $ take (length contents) (orderedListMarkers (start, style', delim)) let width' = (toEnum width + 1) / 2 - let width'' = if width' > 1.5 + let width'' = if width' > (1.5 :: Double) then "width=" ++ show width' ++ "em" else "" let specs2Items = filter (not . null) [start', delim', width''] diff --git a/Text/Pandoc/Writers/Docbook.hs b/Text/Pandoc/Writers/Docbook.hs index ac7c9da12..d089116cf 100644 --- a/Text/Pandoc/Writers/Docbook.hs +++ b/Text/Pandoc/Writers/Docbook.hs @@ -195,7 +195,7 @@ tableItemToDocbook opts tag align width item = let attrib = [("align", align)] ++ if width /= 0 then [("style", "{width: " ++ - show (truncate (100*width)) ++ "%;}")] + show (truncate (100*width) :: Integer) ++ "%;}")] else [] in inTags True tag attrib $ vcat $ map (blockToDocbook opts) item diff --git a/Text/Pandoc/Writers/HTML.hs b/Text/Pandoc/Writers/HTML.hs index 8390b1288..435d78fad 100644 --- a/Text/Pandoc/Writers/HTML.hs +++ b/Text/Pandoc/Writers/HTML.hs @@ -396,9 +396,8 @@ tableItemToHtml :: WriterOptions tableItemToHtml opts tag' align' width' item = do contents <- blockListToHtml opts item let attrib = [align align'] ++ - if width' /= 0 - then [thestyle ("width: " ++ show (truncate (100*width')) ++ - "%;")] + if width' /= 0 + then [thestyle ("width: " ++ (show (truncate (100 * width') :: Integer)) ++ "%;")] else [] return $ tag' ! attrib $ contents diff --git a/Text/Pandoc/Writers/Markdown.hs b/Text/Pandoc/Writers/Markdown.hs index 5f63652bc..93bb593f6 100644 --- a/Text/Pandoc/Writers/Markdown.hs +++ b/Text/Pandoc/Writers/Markdown.hs @@ -286,7 +286,7 @@ getReference label (src, tit) = do let label' = case find ((== label) . fst) refs of Just _ -> -- label is used; generate numerical label case find (\n -> not (any (== [Str (show n)]) - (map fst refs))) [1..10000] of + (map fst refs))) [1..(10000 :: Integer)] of Just x -> [Str (show x)] Nothing -> error "no unique label" Nothing -> label diff --git a/Text/Pandoc/Writers/RTF.hs b/Text/Pandoc/Writers/RTF.hs index 3abd1770f..fb7c58713 100644 --- a/Text/Pandoc/Writers/RTF.hs +++ b/Text/Pandoc/Writers/RTF.hs @@ -195,7 +195,7 @@ tableRowToRTF header indent aligns sizes cols = let columns = concat $ zipWith (tableItemToRTF indent) aligns cols totalTwips = 6 * 1440 -- 6 inches rightEdges = tail $ scanl (\sofar new -> sofar + floor (new * totalTwips)) - 0 sizes + (0 :: Integer) sizes cellDefs = map (\edge -> (if header then "\\clbrdrb\\brdrs" else "") ++ "\\cellx" ++ show edge) |