$Id: MonadIdentity.lhs,v 1.1 1998/01/26 05:22:43 leavens Exp $

The identity monad, adapted from Philip Wadler's paper
"The Essence of Functional Programming", POPL 1992, pages 1-14, section 2.2.

> module MonadIdentity where

> data Identity t = Id t

> instance Monad Identity where
>    (Id x) >>= k = (k x)
>    return x = Id x

> instance Show t => Show (Identity t) where
>    showsPrec p (Id x) = showsPrec p x
