summaryrefslogtreecommitdiff
path: root/libraries
diff options
context:
space:
mode:
authorOleg Grenrus <oleg.grenrus@iki.fi>2021-09-03 22:12:47 +0300
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-09-06 22:58:32 -0400
commit89820293c0559dc744704d0bf3370a035adb17ea (patch)
tree4f5e08a103ed6c6281da6d02501cd0f17b7120f8 /libraries
parent407d3b3a3a219dab56d0a36598c637aa45da61e1 (diff)
downloadhaskell-89820293c0559dc744704d0bf3370a035adb17ea.tar.gz
Define returnA = id
Diffstat (limited to 'libraries')
-rw-r--r--libraries/base/Control/Arrow.hs2
-rw-r--r--libraries/base/changelog.md2
2 files changed, 3 insertions, 1 deletions
diff --git a/libraries/base/Control/Arrow.hs b/libraries/base/Control/Arrow.hs
index eec25a3179..d446013f9a 100644
--- a/libraries/base/Control/Arrow.hs
+++ b/libraries/base/Control/Arrow.hs
@@ -205,7 +205,7 @@ instance Monad m => Arrow (Kleisli m) where
-- | The identity arrow, which plays the role of 'return' in arrow notation.
returnA :: Arrow a => a b b
-returnA = arr id
+returnA = id
-- | Precomposition with a pure function.
(^>>) :: Arrow a => (b -> c) -> a c d -> a b d
diff --git a/libraries/base/changelog.md b/libraries/base/changelog.md
index b71a1fd787..0ce3960092 100644
--- a/libraries/base/changelog.md
+++ b/libraries/base/changelog.md
@@ -16,6 +16,8 @@
* `fromEnum` for `Natural` now throws an error for any number that cannot be
repesented exactly by an `Int` (#20291).
+ * `returnA` is defined as `Control.Category.id` instead of `arr id`.
+
## 4.16.0.0 *TBA*
* Add a `Typeable` constraint to `fromStaticPtr` in the class `GHC.StaticPtr.IsStatic`.