There are some trivial instances for Managed that could be implemented for Codensity, the Monoid instance is put to good use by Gabriel Gonzales in his Applied category theory and abstract algebra talk
instance Semigroup a => Semigroup (Codensity m a) where
(<>) = liftA2 (<>)
instance Monoid a => Monoid (Codensity m a) where
mempty = pure mempty
#if !(MIN_VERSION_base(5,0,0))
mappend = liftA2 (<>)
#endif
There are some trivial instances for
Managed
that could be implemented forCodensity
, theMonoid
instance is put to good use by Gabriel Gonzales in his Applied category theory and abstract algebra talkSame with
Num
,Fractional
,Floating
.