diff options
author | Herbert Valerio Riedel <hvr@gnu.org> | 2015-03-07 11:10:34 +0100 |
---|---|---|
committer | Herbert Valerio Riedel <hvr@gnu.org> | 2015-03-07 11:10:53 +0100 |
commit | eb3661f2b9f8472f3714774126ebe1183484dd85 (patch) | |
tree | 2153640f3a87a099ea1bcd399f327fb8600c7ebc /testsuite/tests | |
parent | 1965202febe27949a027dea90c0f0040fd9236e7 (diff) | |
download | haskell-eb3661f2b9f8472f3714774126ebe1183484dd85.tar.gz |
Re-export `<$>` from Prelude (#10113)
Whether to re-export the `<$>` non-method operator from `Prelude` wasn't
explicitly covered in the original AMP proposal[1], but it turns out that
not doing so forces most code that makes use of applicatives to import
`Data.Functor` or `Control.Applicative` just to get that operator into
scope. To this end, it was proposed to add `<$>` to Prelude as well[2].
The down-side is that this increases the amount of redundant-import
warnings triggered, as well as the relatively minor issue of stealing
the `<$>` operator from the default namespace for good (although at this
point `<$>` is supposed to be ubiquitous anyway due to `Applicative`
being implicitly required into the next Haskell Report)
[1]: https://wiki.haskell.org/Functor-Applicative-Monad_Proposal
[2]: http://thread.gmane.org/gmane.comp.lang.haskell.libraries/24161
Reviewed By: austin, ekmett
Differential Revision: https://phabricator.haskell.org/D680
Diffstat (limited to 'testsuite/tests')
-rw-r--r-- | testsuite/tests/parser/should_compile/T7476/T7476.hs | 2 | ||||
-rw-r--r-- | testsuite/tests/parser/should_compile/T7476/T7476.stdout | 2 | ||||
-rw-r--r-- | testsuite/tests/rename/should_fail/T2993.hs | 2 | ||||
-rw-r--r-- | testsuite/tests/rename/should_fail/T2993.stderr | 2 | ||||
-rw-r--r-- | testsuite/tests/th/T10019.stdout | 2 |
5 files changed, 5 insertions, 5 deletions
diff --git a/testsuite/tests/parser/should_compile/T7476/T7476.hs b/testsuite/tests/parser/should_compile/T7476/T7476.hs index 34ac453752..48f2f1e734 100644 --- a/testsuite/tests/parser/should_compile/T7476/T7476.hs +++ b/testsuite/tests/parser/should_compile/T7476/T7476.hs @@ -1,2 +1,2 @@ import Control.Applicative -main = show <$> pure 1 >>= print +main = (pure 1 >>= print) <**> pure show diff --git a/testsuite/tests/parser/should_compile/T7476/T7476.stdout b/testsuite/tests/parser/should_compile/T7476/T7476.stdout index f6e15d592e..a66ff2f16a 100644 --- a/testsuite/tests/parser/should_compile/T7476/T7476.stdout +++ b/testsuite/tests/parser/should_compile/T7476/T7476.stdout @@ -1 +1 @@ -import Control.Applicative ( (<$>) ) +import Control.Applicative ( (<**>) ) diff --git a/testsuite/tests/rename/should_fail/T2993.hs b/testsuite/tests/rename/should_fail/T2993.hs index 99f2a89ca1..d5de095461 100644 --- a/testsuite/tests/rename/should_fail/T2993.hs +++ b/testsuite/tests/rename/should_fail/T2993.hs @@ -4,5 +4,5 @@ module T2993 where -foo b a = a <$> b . b +foo b a = a <**> b . b diff --git a/testsuite/tests/rename/should_fail/T2993.stderr b/testsuite/tests/rename/should_fail/T2993.stderr index 907a03447b..144ebffccf 100644 --- a/testsuite/tests/rename/should_fail/T2993.stderr +++ b/testsuite/tests/rename/should_fail/T2993.stderr @@ -1,4 +1,4 @@ T2993.hs:7:13: - Not in scope: ‘<$>’ + Not in scope: ‘<**>’ Perhaps you meant ‘<*>’ (imported from Prelude) diff --git a/testsuite/tests/th/T10019.stdout b/testsuite/tests/th/T10019.stdout index 777ff3b045..350338c779 100644 --- a/testsuite/tests/th/T10019.stdout +++ b/testsuite/tests/th/T10019.stdout @@ -1 +1 @@ -"DataConI Ghci1.Some (ForallT [KindedTV a_1627391548 StarT] [] (AppT (AppT ArrowT (VarT a_1627391548)) (AppT (ConT Ghci1.Option) (VarT a_1627391548)))) Ghci1.Option (Fixity 9 InfixL)" +"DataConI Ghci1.Some (ForallT [KindedTV a_1627391549 StarT] [] (AppT (AppT ArrowT (VarT a_1627391549)) (AppT (ConT Ghci1.Option) (VarT a_1627391549)))) Ghci1.Option (Fixity 9 InfixL)" |