rio-0.1.8.0: A standard library for Haskell

Safe HaskellSafe
LanguageHaskell2010

RIO.Partial

Description

Partial functions.

Synopsis

Documentation

fromJust :: Maybe a -> a #

The fromJust function extracts the element out of a Just and throws an error if its argument is Nothing.

Examples

Basic usage:

>>> fromJust (Just 1)
1
>>> 2 * (fromJust (Just 10))
20
>>> 2 * (fromJust Nothing)
*** Exception: Maybe.fromJust: Nothing

read :: Read a => String -> a #

The read function reads input from a string, which must be completely consumed by the input process.

toEnum :: Enum a => Int -> a #

Convert from an Int.