[Haskell-beginners] Are functors in Haskell always injective?

Brent Yorgey byorgey at seas.upenn.edu
Sat Jul 5 17:27:37 UTC 2014


On Sat, Jul 05, 2014 at 02:51:07AM -0300, Dimitri DeFigueiredo wrote:
> 
> However, I don't think there is any way this mapping of types cannot
> be injective in Haskell. It seems that a type constructor, when
> called with two distinct type will always yield another two
> *distinct* types. (E.g. Int and Double yield Maybe Int and Maybe
> Double) So, it seems that Functors in Haskell are actually more
> restrictive than functors can be in general. Is this observation
> correct or did I misunderstand something?

Yes, that's correct.

-Brent


More information about the Beginners mailing list