-- | Tries to read a value from a string.
maybeRead :: Read a => String -> Maybe a
maybeRead str = case reads str of
                 [(x, "")] -> Just x
                 _ -> Nothing
maybeRead :: Read a => String -> Maybe a
maybeRead str = case reads str of
                 [(x, "")] -> Just x
                 _ -> Nothing
maybeRead str = case reads str of
                 [(x, "")] -> Just x
                 _ -> Nothing