MissingH-1.3.0.1: Large utility library

Copyright | Copyright (C) 2005-2011 John Goerzen
License | BSD3
Maintainer | John Goerzen <jgoerzen@complete.org>
Stability | provisional
Portability | portable
Safe Haskell | None
Language | Haskell98

Data.Maybe.Utils

Description

Utilities for working with the Either data type

Synopsis

- forceMaybe :: Maybe a -> a
- forceMaybeMsg :: String -> Maybe a -> a

# Documentation

forceMaybe :: Maybe a -> a

Pulls a Just value out of a Maybe value. If the Maybe value is Nothing, raises an exception with error.

forceMaybeMsg :: String -> Maybe a -> a

Like `forceMaybe`, but lets you customize the error message raised if Nothing is supplied.