diff options
author | Matthew Pickering <matthewtpickering@gmail.com> | 2017-01-03 00:22:03 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2017-01-03 00:22:04 -0500 |
commit | 683ed475964bbd90030deb8f738370ae90b48a22 (patch) | |
tree | 6d1fdbae891f50e1a3202232bb2ddd2b59d5315a | |
parent | 5800b02a1910a468485b272a2063377e8b06ee1d (diff) | |
download | haskell-683ed475964bbd90030deb8f738370ae90b48a22.tar.gz |
Don't use $ in the definition of (<**>) in GHC.Base
($) is special as Richard explains in the note at the top of the page.
However, when adding the note he didn't remove this usage. Normally it
didn't cause any problems as the optimiser optimised it away. However if
one had the propensity to stick one's fingers into the depths of the
inliner, it caused horrible idInfo panics.
Reviewers: rwbarton, hvr, austin, bgamari
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2913
GHC Trac Issues: #13055
-rw-r--r-- | libraries/base/GHC/Base.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libraries/base/GHC/Base.hs b/libraries/base/GHC/Base.hs index 34a038d16c..490596e869 100644 --- a/libraries/base/GHC/Base.hs +++ b/libraries/base/GHC/Base.hs @@ -423,7 +423,8 @@ class Functor f => Applicative f where -- | A variant of '<*>' with the arguments reversed. (<**>) :: Applicative f => f a -> f (a -> b) -> f b -(<**>) = liftA2 (flip ($)) +(<**>) = liftA2 (\a f -> f a) +-- Don't use $ here, see the note at the top of the page -- | Lift a function to actions. -- This function may be used as a value for `fmap` in a `Functor` instance. |