diff options
author | Oleg Grenrus <oleg.grenrus@iki.fi> | 2021-09-03 22:12:47 +0300 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-09-06 22:58:32 -0400 |
commit | 89820293c0559dc744704d0bf3370a035adb17ea (patch) | |
tree | 4f5e08a103ed6c6281da6d02501cd0f17b7120f8 /libraries | |
parent | 407d3b3a3a219dab56d0a36598c637aa45da61e1 (diff) | |
download | haskell-89820293c0559dc744704d0bf3370a035adb17ea.tar.gz |
Define returnA = id
Diffstat (limited to 'libraries')
-rw-r--r-- | libraries/base/Control/Arrow.hs | 2 | ||||
-rw-r--r-- | libraries/base/changelog.md | 2 |
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`. |