diff options
author | Viktor Dukhovni <ietf-dane@dukhovni.org> | 2021-09-27 23:30:19 -0400 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-10-05 14:33:29 -0400 |
commit | 56899c8dce95a6fe4c47291a3a1dd1c49b0d0dfb (patch) | |
tree | c575bf572a4a93e84275d342e06b6bf6bc8f6e52 /libraries | |
parent | 43358ab9d4cfd87971c8e07685d24713d713f7c8 (diff) | |
download | haskell-56899c8dce95a6fe4c47291a3a1dd1c49b0d0dfb.tar.gz |
Note elem ticket 20421
Diffstat (limited to 'libraries')
-rw-r--r-- | libraries/base/Data/Foldable.hs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libraries/base/Data/Foldable.hs b/libraries/base/Data/Foldable.hs index 34fcb5a370..fdd8429cf1 100644 --- a/libraries/base/Data/Foldable.hs +++ b/libraries/base/Data/Foldable.hs @@ -2452,6 +2452,10 @@ elements in a single pass. -- > instance Ord a => HasMember Set.Set a where -- > member = Set.member -- +-- The above suggests that 'elem' may be a misfit in the 'Foldable' class. +-- Alternative design ideas are solicited on GHC's bug tracker via issue +-- [\#20421](https://gitlab.haskell.org/ghc/ghc/-/issues/20421). +-- -- Note that some structure-specific optimisations may of course be possible -- directly in the corresponding @Foldable@ instance, e.g. with @Set@ the size -- of the set is known in advance, without iterating to count the elements, and |