This commit is contained in:
Joey Hess 2012-01-21 02:24:12 -04:00
parent eb9001044f
commit 183bdacca2
4 changed files with 12 additions and 8 deletions

View file

@ -37,7 +37,7 @@ last = Prelude.last
- Ignores leading/trailing whitespace, and throws away any trailing
- text after the part that can be read.
-}
readMaybe :: (Read a) => String -> Maybe a
readMaybe :: Read a => String -> Maybe a
readMaybe s = case reads s of
((x,_):_) -> Just x
_ -> Nothing