Am Mittwoch, 1. August 2007 14:41 schrieb apfelmus: > […] > The problem with the Functor/Cofunctor instances is that they are > ambiguous as soon as a type constructor X is made an instance of both > Functor and Cofunctor . Of course, such an X cannot exist in a > mathematically useful way (really ?)
I think, it can: newtype Const a b = MkConst a instance Functor (Const a) where fmap fun (MkConst a) = MkConst a instance Cofunctor (Const a) where cofmap fun (MkConst a) = MkConst a > […] Best wishes, Wolfgang _______________________________________________ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell