git.iko.soy/typeable/pandoc
on master help sign in
Avoid non-exhaustive pattern match.
commit84e0b905196fae9924c847741c271f40ed57c83f authorJohn MacFarlane <jgm@berkeley.edu> dateFri 10 Aug 2018, 15:34 (8 years ago) parent7a1ec21
1 file changed+1−3
src/Text/Pandoc/Readers/Odt/Generic/Utils.hs+1−3
src/Text/Pandoc/Readers/Odt/Generic/Utils.hs+1−3
@@ -133,9 +133,7 @@ class Lookupable a where
133133-- can be used directly in almost any case.
134134readLookupables :: (Lookupable a) => String -> [(a,String)]
135135readLookupables s = [ (a,rest) | (word,rest) <- lex s,
136− let result = lookup word lookupTable,
137− isJust result,
138− let Just a = result
136+ a <- maybeToList (lookup word lookupTable)
139137 ]
140138
141139-- | Very similar to a simple 'lookup' in the 'lookupTable', but with a lexer.