Added type declarations to avoid -Wall 'defaulting' warnings in writers.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1323 788f1e2b-df1e-0410-8736-df70ead52e1b
commite9668bc988b2be0034632e0da0c061feecb28336
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>
dateTue 15 Jul 2008, 00:32 (18 years ago)
parent5be53bb
Text/Pandoc/Writers/ConTeXt.hs+1−1
@@ -162,7 +162,7 @@ blockToConTeXt (OrderedList (start, style', delim) lst) = do
162162 let width = maximum $ map length $ take (length contents)
163163 (orderedListMarkers (start, style', delim))
164164 let width' = (toEnum width + 1) / 2
165− let width'' = if width' > 1.5
165+ let width'' = if width' > (1.5 :: Double)
166166 then "width=" ++ show width' ++ "em"
167167 else ""
168168 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 =
195195 let attrib = [("align", align)] ++
196196 if width /= 0
197197 then [("style", "{width: " ++
198− show (truncate (100*width)) ++ "%;}")]
198+ show (truncate (100*width) :: Integer) ++ "%;}")]
199199 else []
200200 in inTags True tag attrib $ vcat $ map (blockToDocbook opts) item
201201
Text/Pandoc/Writers/HTML.hs+2−3
@@ -396,9 +396,8 @@ tableItemToHtml :: WriterOptions
396396tableItemToHtml opts tag' align' width' item = do
397397 contents <- blockListToHtml opts item
398398 let attrib = [align align'] ++
399− if width' /= 0
400− then [thestyle ("width: " ++ show (truncate (100*width')) ++
401− "%;")]
399+ if width' /= 0
400+ then [thestyle ("width: " ++ (show (truncate (100 * width') :: Integer)) ++ "%;")]
402401 else []
403402 return $ tag' ! attrib $ contents
404403
Text/Pandoc/Writers/Markdown.hs+1−1
@@ -286,7 +286,7 @@ getReference label (src, tit) = do
286286 let label' = case find ((== label) . fst) refs of
287287 Just _ -> -- label is used; generate numerical label
288288 case find (\n -> not (any (== [Str (show n)])
289− (map fst refs))) [1..10000] of
289+ (map fst refs))) [1..(10000 :: Integer)] of
290290 Just x -> [Str (show x)]
291291 Nothing -> error "no unique label"
292292 Nothing -> label
Text/Pandoc/Writers/RTF.hs+1−1
@@ -195,7 +195,7 @@ tableRowToRTF header indent aligns sizes cols =
195195 let columns = concat $ zipWith (tableItemToRTF indent) aligns cols
196196 totalTwips = 6 * 1440 -- 6 inches
197197 rightEdges = tail $ scanl (\sofar new -> sofar + floor (new * totalTwips))
198− 0 sizes
198+ (0 :: Integer) sizes
199199 cellDefs = map (\edge -> (if header
200200 then "\\clbrdrb\\brdrs"
201201 else "") ++ "\\cellx" ++ show edge)