aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers/Odt
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2020-02-07 08:32:47 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2020-02-07 09:08:22 -0800
commit4c3db9273fc8e92c2c23d4455a6ab178472be06d (patch)
treecdfc8d65ebd56c0a571f8b46854465dd434489de /src/Text/Pandoc/Readers/Odt
parent6cd77d4c638012be63d66882403804aa28feb6ed (diff)
downloadpandoc-4c3db9273fc8e92c2c23d4455a6ab178472be06d.tar.gz
Apply linter suggestions. Add fix_spacing to lint target in Makefile.
Diffstat (limited to 'src/Text/Pandoc/Readers/Odt')
-rw-r--r--src/Text/Pandoc/Readers/Odt/Arrows/Utils.hs4
-rw-r--r--src/Text/Pandoc/Readers/Odt/ContentReader.hs2
-rw-r--r--src/Text/Pandoc/Readers/Odt/Generic/XMLConverter.hs8
-rw-r--r--src/Text/Pandoc/Readers/Odt/StyleReader.hs2
4 files changed, 8 insertions, 8 deletions
diff --git a/src/Text/Pandoc/Readers/Odt/Arrows/Utils.hs b/src/Text/Pandoc/Readers/Odt/Arrows/Utils.hs
index d5eb7e708..ba212ebba 100644
--- a/src/Text/Pandoc/Readers/Odt/Arrows/Utils.hs
+++ b/src/Text/Pandoc/Readers/Odt/Arrows/Utils.hs
@@ -183,14 +183,14 @@ a >>?! f = a >>> right f
=> FallibleArrow a x f (b,b')
-> (b -> b' -> c)
-> FallibleArrow a x f c
-a >>?% f = a >>?^ (uncurry f)
+a >>?% f = a >>?^ uncurry f
---
(^>>?%) :: (ArrowChoice a)
=> (x -> Either f (b,b'))
-> (b -> b' -> c)
-> FallibleArrow a x f c
-a ^>>?% f = arr a >>?^ (uncurry f)
+a ^>>?% f = arr a >>?^ uncurry f
---
(>>?%?) :: (ArrowChoice a)
diff --git a/src/Text/Pandoc/Readers/Odt/ContentReader.hs b/src/Text/Pandoc/Readers/Odt/ContentReader.hs
index ff8cdc5fa..167d4403c 100644
--- a/src/Text/Pandoc/Readers/Odt/ContentReader.hs
+++ b/src/Text/Pandoc/Readers/Odt/ContentReader.hs
@@ -792,7 +792,7 @@ read_frame_title = matchingElement NsSVG "title" (matchChildContent [] read_plai
image_attributes :: Maybe T.Text -> Maybe T.Text -> Attr
image_attributes x y =
- ( "", [], (dim "width" x) ++ (dim "height" y))
+ ( "", [], dim "width" x ++ dim "height" y)
where
dim _ (Just "") = []
dim name (Just v) = [(name, v)]
diff --git a/src/Text/Pandoc/Readers/Odt/Generic/XMLConverter.hs b/src/Text/Pandoc/Readers/Odt/Generic/XMLConverter.hs
index ea4e09403..9b2d3411d 100644
--- a/src/Text/Pandoc/Readers/Odt/Generic/XMLConverter.hs
+++ b/src/Text/Pandoc/Readers/Odt/Generic/XMLConverter.hs
@@ -163,7 +163,7 @@ swapStack' state stack
pushElement :: XML.Element
-> XMLConverterState nsID extraState
-> XMLConverterState nsID extraState
-pushElement e state = state { parentElements = e:(parentElements state) }
+pushElement e state = state { parentElements = e:parentElements state }
-- | Pop the top element from the call stack, unless it is the last one.
popElement :: XMLConverterState nsID extraState
@@ -605,8 +605,8 @@ executeInSub nsID name a = keepingTheValue
(findChild nsID name)
>>> ignoringState liftFailure
>>? switchingTheStack a
- where liftFailure (_, (Left f)) = Left f
- liftFailure (x, (Right e)) = Right (x, e)
+ where liftFailure (_, Left f) = Left f
+ liftFailure (x, Right e) = Right (x, e)
--------------------------------------------------------------------------------
-- Iterating over children
@@ -702,7 +702,7 @@ prepareMatchersC :: (NameSpaceID nsID)
=> [(nsID, ElementName, FallibleXMLConverter nsID extraState x x)]
-> ContentMatchConverter nsID extraState x
--prepareMatchersC = foldSs . (map $ uncurry3 makeMatcherC)
-prepareMatchersC = reverseComposition . (map $ uncurry3 makeMatcherC)
+prepareMatchersC = reverseComposition . map (uncurry3 makeMatcherC)
-- | Takes a list of element-data - converter groups and
-- * Finds all content of the current element
diff --git a/src/Text/Pandoc/Readers/Odt/StyleReader.hs b/src/Text/Pandoc/Readers/Odt/StyleReader.hs
index 99fa05880..c2eae0b82 100644
--- a/src/Text/Pandoc/Readers/Odt/StyleReader.hs
+++ b/src/Text/Pandoc/Readers/Odt/StyleReader.hs
@@ -120,7 +120,7 @@ fontPitchReader = executeInSub NsOffice "font-face-decls" (
lookupDefaultingAttr NsStyle "font-pitch"
))
>>?^ ( M.fromList . foldl accumLegalPitches [] )
- ) `ifFailedDo` (returnV (Right M.empty))
+ ) `ifFailedDo` returnV (Right M.empty)
where accumLegalPitches ls (Nothing,_) = ls
accumLegalPitches ls (Just n,p) = (n,p):ls