Hets - the Heterogeneous Tool Set

CopyrightC. Maeder and Uni Bremen 2002-2005
LicenseGPLv2 or higher, see LICENSE.txt
Maintainerjonathan.von_schroeder@dfki.de
Stabilityexperimental
Portabilityportable
Safe HaskellSafe

Common.Lib.Maybe

Description

This module is a replacement of module Control.Monad.Maybe and only contains the Monad instance for the newtype MaybeT m.

Synopsis

Documentation

newtype MaybeT m a Source #

A monad transformer which adds Maybe semantics to an existing monad.

Constructors

MaybeT 

Fields

Instances

Monad m => Monad (MaybeT m) Source # 

Methods

(>>=) :: MaybeT m a -> (a -> MaybeT m b) -> MaybeT m b

(>>) :: MaybeT m a -> MaybeT m b -> MaybeT m b

return :: a -> MaybeT m a

fail :: String -> MaybeT m a

Monad m => Functor (MaybeT m) Source # 

Methods

fmap :: (a -> b) -> MaybeT m a -> MaybeT m b

(<$) :: a -> MaybeT m b -> MaybeT m a

Monad m => Applicative (MaybeT m) Source # 

Methods

pure :: a -> MaybeT m a

(<*>) :: MaybeT m (a -> b) -> MaybeT m a -> MaybeT m b

(*>) :: MaybeT m a -> MaybeT m b -> MaybeT m b

(<*) :: MaybeT m a -> MaybeT m b -> MaybeT m a

liftToMaybeT :: Monad m => m a -> MaybeT m a Source #