[commit: ghc] master: Define fixity for `Data.Foldable.{elem, notElem}` (d48fed4)

git at git.haskell.org git at git.haskell.org
Fri Sep 19 15:54:51 UTC 2014


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/d48fed4e61afc2b51ac3a513290a66d89c929059/ghc

>---------------------------------------------------------------

commit d48fed4e61afc2b51ac3a513290a66d89c929059
Author: Herbert Valerio Riedel <hvr at gnu.org>
Date:   Fri Sep 19 17:53:33 2014 +0200

    Define fixity for `Data.Foldable.{elem,notElem}`
    
    This was probably just an oversight. With this change the fixity matches
    that from `Data.List.{elem,notElem`}`.
    
    Addresses #9610
    
    Reviewed By: austin, ekmett
    
    Differential Revision: https://phabricator.haskell.org/D227


>---------------------------------------------------------------

d48fed4e61afc2b51ac3a513290a66d89c929059
 libraries/base/Data/Foldable.hs | 2 ++
 libraries/base/changelog.md     | 3 +++
 2 files changed, 5 insertions(+)

diff --git a/libraries/base/Data/Foldable.hs b/libraries/base/Data/Foldable.hs
index f6f787b..b839106 100644
--- a/libraries/base/Data/Foldable.hs
+++ b/libraries/base/Data/Foldable.hs
@@ -71,6 +71,8 @@ import GHC.Arr  ( Array(..), Ix(..), elems )
 import GHC.Base hiding ( foldr )
 import GHC.Num  ( Num(..) )
 
+infix  4 `elem`, `notElem`
+
 -- | Data structures that can be folded.
 --
 -- Minimal complete definition: 'foldMap' or 'foldr'.
diff --git a/libraries/base/changelog.md b/libraries/base/changelog.md
index 6f3c8cc..1dbada0 100644
--- a/libraries/base/changelog.md
+++ b/libraries/base/changelog.md
@@ -29,6 +29,9 @@
 
   * Add `Data.List.uncons` list destructor (#9550)
 
+  * Set fixity for `Data.Foldable.{elem,notElem}` to match the
+    conventional one set for `Data.List.{elem,notElem}` (#9610)
+
 ## 4.7.0.1  *Jul 2014*
 
   * Bundled with GHC 7.8.3



More information about the ghc-commits mailing list