diff options
| author | John MacFarlane <jgm@berkeley.edu> | 2022-09-27 17:59:03 -0700 |
|---|---|---|
| committer | John MacFarlane <jgm@berkeley.edu> | 2022-09-27 17:59:03 -0700 |
| commit | 21bf9ae88502c8eaa22e08f1532d4db846c96be1 (patch) | |
| tree | 45d7d5bf3c6ca95f4905f079414cbe2abebeb0db /src | |
| parent | 4932ee324d675449b2d5120b7d7671a3de0c0d06 (diff) | |
Remove some dead code (unused definitions) from Odt reader.
Diffstat (limited to 'src')
| -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 |
