diff options
author | Andrew Martin <andrew.thaddeus@gmail.com> | 2019-01-04 12:01:25 -0500 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2019-04-03 00:41:05 -0400 |
commit | ea192a0932c6a95d7854e86f743c11249af23ded (patch) | |
tree | bb6ac04d896fae1285e8e380ae600da039fc91e6 /libraries | |
parent | 2ec749b5994aef0eff9185ad2985bfa847cec021 (diff) | |
download | haskell-ea192a0932c6a95d7854e86f743c11249af23ded.tar.gz |
base: Add documentation that liftA2 used to not be a typeclass method
Diffstat (limited to 'libraries')
-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 60a485c9bd..cf9fd81c70 100644 --- a/libraries/base/GHC/Base.hs +++ b/libraries/base/GHC/Base.hs @@ -543,6 +543,9 @@ class Functor f => Applicative f where -- efficient than the default one. In particular, if 'fmap' is an -- expensive operation, it is likely better to use 'liftA2' than to -- 'fmap' over the structure and then use '<*>'. + -- + -- This became a typeclass method in 4.10.0.0. Prior to that, it was + -- a function defined in terms of '<*>' and 'fmap'. liftA2 :: (a -> b -> c) -> f a -> f b -> f c liftA2 f x = (<*>) (fmap f x) |