I proposed same thing some time ago. The main point of contention was the name. I hope you have better luck!On Tue, Mar 27, 2018, 10:23 AM Daniel Cartwright <chessai1996@gmail.com> wrote:I see this as being generally (as in, to the users of Haskell as a whole) useful:______________________________newtype Ap f a = Ap { getAp :: f a }deriving (Applicative, Eq, Foldable, Functor, Generic, Generic1,Monad, Ord, Read, Show, Traversable)Some hand-written instances:instance (Applicative f, Semigroup a) => Semigroup (Ap f a) where(Ap x) <> (Ap y) = Ap $ liftA2 (<>) x yinstance (Applicative f, Monoid a) => Monoid (Ap f a) wheremempty = Ap $ pure mempty_________________
Libraries mailing list
Libraries@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries