[GHC] #9330: Introduce shortcut for "on (==)" much like there's a shortcut for "on compare".
GHC
ghc-devs at haskell.org
Fri Jul 18 15:25:13 UTC 2014
#9330: Introduce shortcut for "on (==)" much like there's a shortcut for "on
compare".
-------------------------------------+-------------------------------------
Reporter: frerich | Owner:
Type: feature | Status: new
request | Milestone:
Priority: normal | Version: 7.8.2
Component: | Keywords:
libraries/base | Operating System: Unknown/Multiple
Resolution: | Type of failure: None/Unknown
Differential Revisions: | Test Case:
Architecture: | Blocking:
Unknown/Multiple |
Difficulty: Unknown |
Blocked By: |
Related Tickets: |
-------------------------------------+-------------------------------------
Comment (by frerich):
A lot of `*By` functions taking an `a -> a -> Bool` are in `Data.List`,
e.g. `groupBy`, `nubBy`, `deleteBy`, `intersectBy`, `unionBy`. Hence, it
seems plausible to define `equating` in `Data.List`.
This is the same reasoning as why `comparing` is in `Data.Ord`: because
the module exposes a lot of `*By` functions taking an `a -> a ->
Ordering`.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9330#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list