[Haskell-beginners] Date Time in Haskell
Michael Orlitzky
michael at orlitzky.com
Thu May 14 15:23:08 UTC 2015
On 05/14/2015 06:25 AM, Kostiantyn Rybnikov wrote:
> Hi Dananji!
>
> First of all, for more explicit failure-handling I suggest using "readMay"
> from package "safe" [0] instead of "read" whenever possible.
This is always a good idea, and someone finally added it to the base
library (in 4.6.0.0) as "readMaybe".
ghci> import Text.Read ( readMaybe )
ghci> readMaybe "Hello, world!" :: Maybe Integer
Nothing
More information about the Beginners
mailing list