aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers/Odt/Generic
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2018-08-10 15:34:10 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2018-08-10 15:34:10 -0700
commit84e0b905196fae9924c847741c271f40ed57c83f (patch)
tree7a330b6d9b994819d4e2386227d9ee7ee65e598d /src/Text/Pandoc/Readers/Odt/Generic
parent7a1ec21faac7d61782f1595b8bcc671139268e39 (diff)
downloadpandoc-84e0b905196fae9924c847741c271f40ed57c83f.tar.gz
Avoid non-exhaustive pattern match.
Diffstat (limited to 'src/Text/Pandoc/Readers/Odt/Generic')
-rw-r--r--src/Text/Pandoc/Readers/Odt/Generic/Utils.hs4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Readers/Odt/Generic/Utils.hs b/src/Text/Pandoc/Readers/Odt/Generic/Utils.hs
index 722c30a33..45c6cd58c 100644
--- a/src/Text/Pandoc/Readers/Odt/Generic/Utils.hs
+++ b/src/Text/Pandoc/Readers/Odt/Generic/Utils.hs
@@ -133,9 +133,7 @@ class Lookupable a where
-- can be used directly in almost any case.
readLookupables :: (Lookupable a) => String -> [(a,String)]
readLookupables s = [ (a,rest) | (word,rest) <- lex s,
- let result = lookup word lookupTable,
- isJust result,
- let Just a = result
+ a <- maybeToList (lookup word lookupTable)
]
-- | Very similar to a simple 'lookup' in the 'lookupTable', but with a lexer.