rio-0.1.8.0: A standard library for Haskell
RIO.Partial
Description
Partial functions.
Synopsis
fromJust :: Maybe a -> a #
The fromJust function extracts the element out of a Just and throws an error if its argument is Nothing.
fromJust
Just
Nothing
Basic usage:
>>> fromJust (Just 1) 1
>>>
fromJust (Just 1)
>>> 2 * (fromJust (Just 10)) 20
2 * (fromJust (Just 10))
>>> 2 * (fromJust Nothing) *** Exception: Maybe.fromJust: Nothing
2 * (fromJust Nothing)
read :: Read a => String -> a #
The read function reads input from a string, which must be completely consumed by the input process.
read
toEnum :: Enum a => Int -> a #
Convert from an Int.
Int