Improve Data.Functor documentation

chessai . chessai1996 at gmail.com
Mon Nov 11 12:34:24 UTC 2019


Just realised, I forgot the links.

[1]:
http://hackage.haskell.org/package/base-4.12.0.0/docs/Data-Bifunctor.html

[2]:
http://hackage.haskell.org/package/profunctors-5.5/docs/Data-Profunctor.html

On Mon, Nov 11, 2019, 7:30 AM chessai . <chessai1996 at gmail.com> wrote:

> A beginner learning about parametricity and the relationship between
> Functorial composition and Functor identity brought up a good point to me:
> the documentation for Bifunctor[1] and Profunctor[2] both explain the
> relationship between parametricity and their laws, particularly what
> constitutes a minimum "burden" of proof. I don't have an exact wording yet,
> but I think it would be a good idea to update the Functor documentation
> accordingly.
>
> A separate point of issue: The line "The instances of Functor for lists,
> Maybe and IO satisfy these laws." This statement is redundant at best when
> you consider that Haskellers aim for instances of Functor to be lawful. At
> worst it could leave beginners confused and with more questions. I could
> imagine someone interpreting this statement as saying there might exist
> some unlawful instances. I think this line should just be removed.
>
> Let me know what you think.
>
> Thanks
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20191111/4281a839/attachment.html>


More information about the Libraries mailing list