From: Viktor Dukhovni <ietf-dane@dukhovni.org>
To: haskell-cafe@haskell.org
Subject: Re: [Haskell-cafe] Haskell function composition commutivity?
Message-ID: <YHYPMnJcYzdEolzl@straasha.imrryr.org>
Content-Type: text/plain; charset=us-ascii
On Tue, Apr 13, 2021 at 02:19:46PM -0500, Galaxy Being wrote:Your answers seem to originate outside of normal Haskell tutorials. Where
can I start with this higher superset theory?
There's a reason why the tutorials don't cover this, the categorical
foundations of Haskell types are not beginner material. It is perhaps
best to defer going down this rabbit hole until you're more comfortable
with the Haskell generally.
You could start with:
https://bartoszmilewski.com/2014/10/28/category-theory-for-programmers-the-preface/
https://bartoszmilewski.com/2015/04/07/natural-transformations/
For the Yoneda Lemma specifically, I'd recommend:
http://blog.sigfpe.com/2006/11/yoneda-lemma.html
Parametricity is covered in "Theorems for free":
https://www2.cs.sfu.ca/CourseCentral/831/burton/Notes/July14/free.pdf
but it is by no means elementary, though skimming it for the essential
facts and skipping the gory details is not too difficult.
You could also read "Categories for the Working Mathematician" by
Saunders Mac Lane.