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
_
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
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
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
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
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
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