Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Partial functions. Import as:
import qualified RIO.Partial as RIO'
Documentation
fromJust :: HasCallStack => Maybe a -> a #
read :: Read a => String -> a #
The read
function reads input from a string, which must be
completely consumed by the input process. read
fails with an error
if the
parse is unsuccessful, and it is therefore discouraged from being used in
real applications. Use readMaybe
or readEither
for safe alternatives.
>>>
read "123" :: Int
123
>>>
read "hello" :: Int
*** Exception: Prelude.read: no parse