[Haskell-cafe] Unique functor instance

2008-11-25 Thread Luke Palmer
I've been wondering, is it ever possible to have two (extensionally) different Functor instances for the same type? I do mean in Haskell; i.e. (,) doesn't count. I've failed to either come up with any examples or prove that they all must be the same using the laws. Thanks, Luke _

Re: [Haskell-cafe] Unique functor instance

2008-11-25 Thread Janis Voigtlaender
Luke Palmer wrote: I've been wondering, is it ever possible to have two (extensionally) different Functor instances for the same type? I do mean in Haskell; i.e. (,) doesn't count. I've failed to either come up with any examples or prove that they all must be the same using the laws. For "not

Re: [Haskell-cafe] Unique functor instance

2008-11-25 Thread Janis Voigtlaender
Janis Voigtlaender wrote: Luke Palmer wrote: I've been wondering, is it ever possible to have two (extensionally) different Functor instances for the same type? I do mean in Haskell; i.e. (,) doesn't count. I've failed to either come up with any examples or prove that they all must be the sam

Re: [Haskell-cafe] Unique functor instance

2008-11-25 Thread Claus Reinke
Luke Palmer wrote: I've been wondering, is it ever possible to have two (extensionally) different Functor instances for the same type? I do mean in Haskell; i.e. (,) doesn't count. I've failed to either come up with any examples or prove that they all must be the same using the laws. For "not

Re: [Haskell-cafe] Unique functor instance

2008-11-25 Thread Claus Reinke
Are identity and composition sufficient to guarantee that the mapped function is actually applied? eek - f :: a -> b, not f :: a -> a, so that example doesn't work !! Sorry for the noise, Claus ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org h

Re: [Haskell-cafe] Unique functor instance

2008-11-25 Thread Janis Voigtlaender
Claus Reinke wrote: Luke Palmer wrote: I've been wondering, is it ever possible to have two (extensionally) different Functor instances for the same type? I do mean in Haskell; i.e. (,) doesn't count. I've failed to either come up with any examples or prove that they all must be the same usin

Re: [Haskell-cafe] Unique functor instance

2008-11-25 Thread Janis Voigtlaender
Janis Voigtlaender wrote: A free theorem can be used to prove that any f :: (a -> b) -> [a] -> [b] which satisfies f id = id also satisfies f = map (for the Haskell standard map). Here comes the full proof. Feed http://linux.tcs.inf.tu-dresden.de/~voigt/ft/ with the type of f. The output