# Talk:TypeCompose

### From HaskellWiki

(Difference between revisions)

(notes on WrappedApplicative and type composition) |
(Reply to Wolfgang -- App) |

## Revision as of 20:18, 4 December 2007

Hello Conal,

I have a typeWrappedApplicative

Data.Monoid.Bonus

Data.Monoid.Bonus

(Applicative a, Monoid m) => Monoid (WrappedApplicative a m)

WrappedApplicative

* -> *

*

Monoid

WrappedApplicative

WrappedMonad

WrappedMonad

What do you think?

-- Wolfgang Jeltsch 18:23, 4 December 2007 (UTC)

I like it. It's the same as

App

Control.Compose

newtype App f a = App { unApp :: f a } instance (Applicative f, Monoid m) => Monoid (App f m) where mempty = App (pure mempty ) App a `mappend` App b = App (liftA2 mappend a b)

inApp2

Compose

instance (Applicative f, Monoid m) => Monoid (App f m) where mempty = App (pure mempty ) mappend = inApp2 (liftA2 mappend)

App

data f :$ a = f :$ a

I guess I'd like two infix ops -- one left-associative and one right-associative.

By the way, have you played with(:*:)

(:*:)

App

WrappedMonad

WrappedApplicative

-- Conal 20:18, 4 December 2007 (UTC)