Don't ignore leftovers in parsing #780
This commit is contained in:
parent
972efd0ca4
commit
2d54a5df13
@ -233,7 +233,7 @@ $newline never
|
|||||||
}
|
}
|
||||||
|
|
||||||
readMay :: Read a => String -> Maybe a
|
readMay :: Read a => String -> Maybe a
|
||||||
readMay s = case reads s of
|
readMay s = case filter (null . snd) $ reads s of
|
||||||
(x, _):_ -> Just x
|
(x, _):_ -> Just x
|
||||||
[] -> Nothing
|
[] -> Nothing
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user