aelve / haskell-issues

An unofficial issue tracker for all things Haskell-related
18 stars 0 forks source link

EndoT #36

Open Gurkenglas opened 8 years ago

Gurkenglas commented 8 years ago
import Data.Coercible
data EndoT m a = EndoT {runEndoT :: a  -> m a} deriving Wrapped

instance Monad m => Monoid (EndoT m a) where
  mempty = coerce return
  mappend = coerce (<=<)

(deriving Wrapped)