diff options
-rw-r--r-- | libraries/base/Control/Arrow.hs | 2 | ||||
-rw-r--r-- | libraries/base/changelog.md | 2 | ||||
-rw-r--r-- | testsuite/tests/simplCore/should_compile/T18013.stderr | 6 |
3 files changed, 7 insertions, 3 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`. diff --git a/testsuite/tests/simplCore/should_compile/T18013.stderr b/testsuite/tests/simplCore/should_compile/T18013.stderr index 5c82b03c93..5fe7eec578 100644 --- a/testsuite/tests/simplCore/should_compile/T18013.stderr +++ b/testsuite/tests/simplCore/should_compile/T18013.stderr @@ -5,7 +5,8 @@ Rule fired: Class op $p1Arrow (BUILTIN) Rule fired: Class op $p1Arrow (BUILTIN) Rule fired: Class op $p1Arrow (BUILTIN) Rule fired: Class op $p1Arrow (BUILTIN) -Rule fired: Class op arr (BUILTIN) +Rule fired: Class op $p1Arrow (BUILTIN) +Rule fired: Class op id (BUILTIN) Rule fired: Class op $p1Monad (BUILTIN) Rule fired: Class op pure (BUILTIN) Rule fired: Class op $p1Monad (BUILTIN) @@ -70,7 +71,8 @@ Rule fired: Class op >>= (BUILTIN) Rule fired: Class op >>= (BUILTIN) Rule fired: Class op pure (BUILTIN) Rule fired: Class op $p1Arrow (BUILTIN) -Rule fired: Class op arr (BUILTIN) +Rule fired: Class op $p1Arrow (BUILTIN) +Rule fired: Class op id (BUILTIN) Rule fired: Class op $p1Monad (BUILTIN) Rule fired: Class op pure (BUILTIN) Rule fired: Class op $p1Monad (BUILTIN) |