diff options
author | John MacFarlane <jgm@berkeley.edu> | 2018-01-19 21:25:24 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2018-01-19 21:25:24 -0800 |
commit | b8ffd834cff717fe424f22e506351f2ecec4655a (patch) | |
tree | 70359c33066bebf2ec4c54c1c2d78f38b49c0fb8 /src/Text/Pandoc/Writers/RTF.hs | |
parent | 8b3707de0402165b5691f626370203fa8982a5dc (diff) | |
download | pandoc-b8ffd834cff717fe424f22e506351f2ecec4655a.tar.gz |
hlint code improvements.
Diffstat (limited to 'src/Text/Pandoc/Writers/RTF.hs')
-rw-r--r-- | src/Text/Pandoc/Writers/RTF.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Text/Pandoc/Writers/RTF.hs b/src/Text/Pandoc/Writers/RTF.hs index 790bebc01..7006b58d1 100644 --- a/src/Text/Pandoc/Writers/RTF.hs +++ b/src/Text/Pandoc/Writers/RTF.hs @@ -31,6 +31,7 @@ Conversion of 'Pandoc' documents to RTF (rich text format). module Text.Pandoc.Writers.RTF ( writeRTF ) where import Control.Monad.Except (catchError, throwError) +import Control.Monad import qualified Data.ByteString as B import Data.Char (chr, isDigit, ord) import Data.List (intercalate, isSuffixOf) @@ -278,8 +279,7 @@ blockToRTF indent alignment (BulletList lst) = (spaceAtEnd . concat) <$> mapM (listItemToRTF alignment indent (bulletMarker indent)) lst blockToRTF indent alignment (OrderedList attribs lst) = (spaceAtEnd . concat) <$> - mapM (uncurry (listItemToRTF alignment indent)) - (zip (orderedMarkers indent attribs) lst) + zipWithM (listItemToRTF alignment indent) (orderedMarkers indent attribs) lst blockToRTF indent alignment (DefinitionList lst) = (spaceAtEnd . concat) <$> mapM (definitionListItemToRTF alignment indent) lst blockToRTF indent _ HorizontalRule = return $ @@ -303,8 +303,8 @@ tableRowToRTF header indent aligns sizes' cols = do let sizes = if all (== 0) sizes' then replicate (length cols) (1.0 / fromIntegral (length cols)) else sizes' - columns <- concat <$> mapM (uncurry (tableItemToRTF indent)) - (zip aligns cols) + columns <- concat <$> + zipWithM (tableItemToRTF indent) aligns cols let rightEdges = tail $ scanl (\sofar new -> sofar + floor (new * totalTwips)) (0 :: Integer) sizes let cellDefs = map (\edge -> (if header |