Re: [Haskell-cafe] Questions about the Functor class and it's use in "Data types à la carte"
Felipe Lessa
felipe.lessa at gmail.com
Fri Dec 14 21:09:34 EST 2007
On Dec 15, 2007 12:00 AM, David Menendez <dave at zednenem.com> wrote:
> These can (and, if Val is a newtype, will) be compiled to the same code, but
> they don't have the same type. In particular, there is no way to unify "a ->
> a" with "f a -> f b" for any f.
Thanks for noticing that! I hadn't seen before that the two Val constructors in
fmap f (Val x) = Val x
were of different types.
Cheers,
--
Felipe.
More information about the Haskell-Cafe
mailing list