git.iko.soy/typeable/pandoc
on master help sign in
Added type declarations to avoid -Wall 'defaulting' warnings in writers.
e9668bcfiddlosopher
Text/Pandoc/Writers/ConTeXt.hs+1−1
@@ -162,7 +162,7 @@ blockToConTeXt (OrderedList (start, style', delim) lst) = do
162 let width = maximum $ map length $ take (length contents)
162 let width = maximum $ map length $ take (length contents)
163 (orderedListMarkers (start, style', delim))
163 (orderedListMarkers (start, style', delim))
164 let width' = (toEnum width + 1) / 2
164 let width' = (toEnum width + 1) / 2
165− let width'' = if width' > 1.5
165+ let width'' = if width' > (1.5 :: Double)
166 then "width=" ++ show width' ++ "em"
166 then "width=" ++ show width' ++ "em"
167 else ""
167 else ""
168 let specs2Items = filter (not . null) [start', delim', width'']
168 let specs2Items = filter (not . null) [start', delim', width'']
Text/Pandoc/Writers/Docbook.hs+1−1
@@ -195,7 +195,7 @@ tableItemToDocbook opts tag align width item =
195 let attrib = [("align", align)] ++
195 let attrib = [("align", align)] ++
196 if width /= 0
196 if width /= 0
197 then [("style", "{width: " ++
197 then [("style", "{width: " ++
198− show (truncate (100*width)) ++ "%;}")]
198+ show (truncate (100*width) :: Integer) ++ "%;}")]
199 else []
199 else []
200 in inTags True tag attrib $ vcat $ map (blockToDocbook opts) item
200 in inTags True tag attrib $ vcat $ map (blockToDocbook opts) item
201
201
Text/Pandoc/Writers/HTML.hs+2−3
@@ -396,9 +396,8 @@ tableItemToHtml :: WriterOptions
396tableItemToHtml opts tag' align' width' item = do
396tableItemToHtml opts tag' align' width' item = do
397 contents <- blockListToHtml opts item
397 contents <- blockListToHtml opts item
398 let attrib = [align align'] ++
398 let attrib = [align align'] ++
399− if width' /= 0
399+ if width' /= 0
400− then [thestyle ("width: " ++ show (truncate (100*width')) ++
400+ then [thestyle ("width: " ++ (show (truncate (100 * width') :: Integer)) ++ "%;")]
401− "%;")]
402 else []
401 else []
403 return $ tag' ! attrib $ contents
402 return $ tag' ! attrib $ contents
404
403
Text/Pandoc/Writers/Markdown.hs+1−1
@@ -286,7 +286,7 @@ getReference label (src, tit) = do
286 let label' = case find ((== label) . fst) refs of
286 let label' = case find ((== label) . fst) refs of
287 Just _ -> -- label is used; generate numerical label
287 Just _ -> -- label is used; generate numerical label
288 case find (\n -> not (any (== [Str (show n)])
288 case find (\n -> not (any (== [Str (show n)])
289− (map fst refs))) [1..10000] of
289+ (map fst refs))) [1..(10000 :: Integer)] of
290 Just x -> [Str (show x)]
290 Just x -> [Str (show x)]
291 Nothing -> error "no unique label"
291 Nothing -> error "no unique label"
292 Nothing -> label
292 Nothing -> label
Text/Pandoc/Writers/RTF.hs+1−1
@@ -195,7 +195,7 @@ tableRowToRTF header indent aligns sizes cols =
195 let columns = concat $ zipWith (tableItemToRTF indent) aligns cols
195 let columns = concat $ zipWith (tableItemToRTF indent) aligns cols
196 totalTwips = 6 * 1440 -- 6 inches
196 totalTwips = 6 * 1440 -- 6 inches
197 rightEdges = tail $ scanl (\sofar new -> sofar + floor (new * totalTwips))
197 rightEdges = tail $ scanl (\sofar new -> sofar + floor (new * totalTwips))
198− 0 sizes
198+ (0 :: Integer) sizes
199 cellDefs = map (\edge -> (if header
199 cellDefs = map (\edge -> (if header
200 then "\\clbrdrb\\brdrs"
200 then "\\clbrdrb\\brdrs"
201 else "") ++ "\\cellx" ++ show edge)
201 else "") ++ "\\cellx" ++ show edge)