[Haskell-cafe] Transparent identity instances

2010-11-28 Thread Jafet
t was a type synonym > {-# LANGUAGE TypeSynonymInstances #-} > type Identity 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 i

[Haskell-cafe] Re: Transparent identity instances

2010-11-29 Thread Jafet
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 >&