diff options
Diffstat (limited to 'src/Text/Pandoc/Readers/Odt')
-rw-r--r-- | src/Text/Pandoc/Readers/Odt/Arrows/Utils.hs | 4 | ||||
-rw-r--r-- | src/Text/Pandoc/Readers/Odt/ContentReader.hs | 2 | ||||
-rw-r--r-- | src/Text/Pandoc/Readers/Odt/Generic/XMLConverter.hs | 8 | ||||
-rw-r--r-- | src/Text/Pandoc/Readers/Odt/StyleReader.hs | 2 |
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 |