diff options
author | Krzysztof Gogolewski <krzysztof.gogolewski@tweag.io> | 2021-06-23 22:17:47 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-07-28 13:18:31 -0400 |
commit | a57e4a972ac45c8214acd29e9511cc8bea841914 (patch) | |
tree | 9c996465de402b6035d40d8084098fc672346b8b | |
parent | 2625d48efb6dc19506f1404cc5b0ec0e1b476a17 (diff) | |
download | haskell-a57e4a972ac45c8214acd29e9511cc8bea841914.tar.gz |
Functor docs: link to free theorem explanation (#19300)
-rw-r--r-- | libraries/base/GHC/Base.hs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libraries/base/GHC/Base.hs b/libraries/base/GHC/Base.hs index 5a9d38f147..508edb71e2 100644 --- a/libraries/base/GHC/Base.hs +++ b/libraries/base/GHC/Base.hs @@ -523,6 +523,9 @@ structure of @f@. Furthermore @f@ needs to adhere to the following: Note, that the second law follows from the free theorem of the type 'fmap' and the first law, so you need only check that the former condition holds. +See <https://www.schoolofhaskell.com/user/edwardk/snippets/fmap> or +<https://github.com/quchen/articles/blob/master/second_functor_law.md> +for an explanation. -} class Functor f where |