diff options
author | John MacFarlane <jgm@berkeley.edu> | 2018-08-10 15:34:10 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2018-08-10 15:34:10 -0700 |
commit | 84e0b905196fae9924c847741c271f40ed57c83f (patch) | |
tree | 7a330b6d9b994819d4e2386227d9ee7ee65e598d /src/Text | |
parent | 7a1ec21faac7d61782f1595b8bcc671139268e39 (diff) | |
download | pandoc-84e0b905196fae9924c847741c271f40ed57c83f.tar.gz |
Avoid non-exhaustive pattern match.
Diffstat (limited to 'src/Text')
-rw-r--r-- | src/Text/Pandoc/Readers/Odt/Generic/Utils.hs | 4 |
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. |