Avoid non-exhaustive pattern match.
This commit is contained in:
parent
7a1ec21faa
commit
84e0b90519
1 changed files with 1 additions and 3 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Reference in a new issue