diff options
author | David Feuer <david.feuer@gmail.com> | 2017-02-07 00:16:55 -0500 |
---|---|---|
committer | David Feuer <David.Feuer@gmail.com> | 2017-02-07 00:16:56 -0500 |
commit | 2219c8cd612ec7920a3bd1661b3c663575737267 (patch) | |
tree | 43c944b3fd09c9719a27f871abba1a6ece01e16b /compiler/prelude/PrelNames.hs | |
parent | a28a55211d6fb8d3182b0a9e47656ff9ca8a3766 (diff) | |
download | haskell-2219c8cd612ec7920a3bd1661b3c663575737267.tar.gz |
Derive <$
Using the default definition of `<$` for derived `Functor`
instance is very bad for recursive data types. Derive
the definition instead.
Fixes #13218
Reviewers: austin, bgamari, RyanGlScott
Reviewed By: RyanGlScott
Subscribers: RyanGlScott, thomie
Differential Revision: https://phabricator.haskell.org/D3072
Diffstat (limited to 'compiler/prelude/PrelNames.hs')
-rw-r--r-- | compiler/prelude/PrelNames.hs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/compiler/prelude/PrelNames.hs b/compiler/prelude/PrelNames.hs index 4570076404..b8959e3d63 100644 --- a/compiler/prelude/PrelNames.hs +++ b/compiler/prelude/PrelNames.hs @@ -256,9 +256,12 @@ basicKnownKeyNames -- Applicative stuff pureAName, apAName, thenAName, + -- Functor stuff + fmapName, + -- Monad stuff thenIOName, bindIOName, returnIOName, failIOName, bindMName, thenMName, - returnMName, fmapName, joinMName, + returnMName, joinMName, -- MonadFail monadFailClassName, failMName, failMName_preMFP, @@ -809,9 +812,10 @@ uFloatHash_RDR = varQual_RDR gHC_GENERICS (fsLit "uFloat#") uIntHash_RDR = varQual_RDR gHC_GENERICS (fsLit "uInt#") uWordHash_RDR = varQual_RDR gHC_GENERICS (fsLit "uWord#") -fmap_RDR, pure_RDR, ap_RDR, liftA2_RDR, foldable_foldr_RDR, foldMap_RDR, - traverse_RDR, mempty_RDR, mappend_RDR :: RdrName +fmap_RDR, replace_RDR, pure_RDR, ap_RDR, liftA2_RDR, foldable_foldr_RDR, + foldMap_RDR, traverse_RDR, mempty_RDR, mappend_RDR :: RdrName fmap_RDR = varQual_RDR gHC_BASE (fsLit "fmap") +replace_RDR = varQual_RDR gHC_BASE (fsLit "<$") pure_RDR = nameRdrName pureAName ap_RDR = nameRdrName apAName liftA2_RDR = varQual_RDR gHC_BASE (fsLit "liftA2") |