On Sun, Nov 28, 2010 at 10:59 PM, Jafet wrote:
Hi,
Does it make sense to declare a transparent identity instance for
Functor, Applicative, Monad, etc?
For example, I might want to generalize ($) = (*) where
($) :: (a - b) - a - b
(*) :: (Functor f) = f (a - b) - f a - f b
a = a
instance Applicative Identity where
-- something like
pure a = a
f * a = f a
But GHC does not accept type synonym instances unless they are fully applied.
Is it sound for such an instance to exist? If so, how might it be defined?
--
Jafet