summaryrefslogtreecommitdiff
path: root/testsuite/tests
diff options
context:
space:
mode:
authorGergo ERDI <gergo@erdi.hu>2022-05-16 14:02:20 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-10-17 19:20:04 -0400
commit8c72411d9504963069fb1ae736a2470cb9ae1250 (patch)
tree7b3232544dcda6a7c94c423581fd44529768b258 /testsuite/tests
parentc1e5719aa500cb9e0f2549eb9b9e2255038ac35d (diff)
downloadhaskell-8c72411d9504963069fb1ae736a2470cb9ae1250.tar.gz
Add `Enum (Down a)` instance that swaps `succ` and `pred`
See https://github.com/haskell/core-libraries-committee/issues/51 for discussion. The key points driving the implementation are the following two ideas: * For the `Int` type, `comparing (complement @Int)` behaves exactly as an order-swapping `compare @Int`. * `enumFrom @(Down a)` can be implemented in terms of `enumFromThen @a`, if only the corner case of starting at the very end is handled specially
Diffstat (limited to 'testsuite/tests')
0 files changed, 0 insertions, 0 deletions