diff options
| -rw-r--r-- | src/Text/Pandoc/Readers/Odt/Arrows/Utils.hs | 8 | ||||
| -rw-r--r-- | src/Text/Pandoc/Readers/Odt/Generic/Fallible.hs | 7 | ||||
| -rw-r--r-- | src/Text/Pandoc/Readers/Odt/Generic/XMLConverter.hs | 10 |
3 files changed, 2 insertions, 23 deletions
diff --git a/src/Text/Pandoc/Readers/Odt/Arrows/Utils.hs b/src/Text/Pandoc/Readers/Odt/Arrows/Utils.hs index a067895ec..45e5a525c 100644 --- a/src/Text/Pandoc/Readers/Odt/Arrows/Utils.hs +++ b/src/Text/Pandoc/Readers/Odt/Arrows/Utils.hs @@ -184,12 +184,6 @@ a >>?! f = a >>> right f -> FallibleArrow a x f c 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 --- (>>?%?) :: (ArrowChoice a) @@ -200,7 +194,7 @@ a >>?%? f = a >>?^? uncurry f infixr 1 >>?, >>?^, >>?^? infixr 1 ^>>?, >>?! -infixr 1 >>?%, ^>>?%, >>?%? +infixr 1 >>?%, >>?%? -- | An arrow version of a short-circuit (<|>) ifFailedDo :: (ArrowChoice a) diff --git a/src/Text/Pandoc/Readers/Odt/Generic/Fallible.hs b/src/Text/Pandoc/Readers/Odt/Generic/Fallible.hs index 2ec2174a6..1902259c4 100644 --- a/src/Text/Pandoc/Readers/Odt/Generic/Fallible.hs +++ b/src/Text/Pandoc/Readers/Odt/Generic/Fallible.hs @@ -35,12 +35,7 @@ eitherToMaybe :: Either _l a -> Maybe a eitherToMaybe (Left _) = Nothing eitherToMaybe (Right a) = Just a --- | > fromLeft f === either f id -fromLeft :: (a -> b) -> Either a b -> b -fromLeft f (Left a) = f a -fromLeft _ (Right b) = b - --- | > recover a === fromLeft (const a) === either (const a) id +-- | > recover a === either (const a) id recover :: a -> Either _f a -> a recover a (Left _) = a recover _ (Right a) = a diff --git a/src/Text/Pandoc/Readers/Odt/Generic/XMLConverter.hs b/src/Text/Pandoc/Readers/Odt/Generic/XMLConverter.hs index 6740d44ad..551279cf6 100644 --- a/src/Text/Pandoc/Readers/Odt/Generic/XMLConverter.hs +++ b/src/Text/Pandoc/Readers/Odt/Generic/XMLConverter.hs @@ -40,7 +40,6 @@ module Text.Pandoc.Readers.Odt.Generic.XMLConverter , findAttrText' , findAttr , findAttrText -, findAttrWithDefault , findAttrTextWithDefault , readAttr , readAttr' @@ -496,15 +495,6 @@ findAttrText nsID attrName >>> maybeToChoice -- | Return value as string or return provided default value -findAttrWithDefault :: (NameSpaceID nsID) - => nsID -> AttributeName - -> AttributeValue - -> XMLConverter nsID extraState x AttributeValue -findAttrWithDefault nsID attrName deflt - = findAttr' nsID attrName - >>^ fromMaybe deflt - --- | Return value as string or return provided default value findAttrTextWithDefault :: (NameSpaceID nsID) => nsID -> AttributeName -> TextAttributeValue |
