Ticket #1953 (closed proposal: wontfix)

Opened 5 years ago

Last modified 4 years ago

Add Bounded instance for IntSet

Reported by: dbenbenn Owned by:
Priority: normal Milestone: Not GHC
Component: libraries (other) Version: 6.8.1
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Difficulty: Easy (less than 1 hour)
Test Case: Blocked By:
Blocking: Related Tickets:

Description

I propose to add a Bounded instance to IntSet.hs.

IntSet is in Ord, and there are only finitely many instances of IntSet. Therefore there is a min IntSet and a max IntSet. It turns out these bounds are very simple:

instance Bounded IntSet where
    minBound = fromList []
    maxBound = fromList [maxBound]

Suggested deadline: December 16, 2007.

Attachments

BoundedIntSet.txt Download (0.8 KB) - added by dbenbenn 5 years ago.

Change History

Changed 5 years ago by dbenbenn

Changed 5 years ago by dbenbenn

Actually, here's a slightly better way of writing the same code:

instance Bounded IntSet where
    minBound = empty
    maxBound = singleton maxBound

Changed 5 years ago by igloo

  • milestone set to Not GHC

Changed 5 years ago by igloo

  • status changed from new to closed
  • resolution set to wontfix

This proposal seems to be abandoned

Changed 5 years ago by simonmar

  • architecture changed from Multiple to Unknown/Multiple

Changed 5 years ago by simonmar

  • os changed from Multiple to Unknown/Multiple

Changed 4 years ago by simonmar

  • difficulty changed from Easy (1 hr) to Easy (less than 1 hour)
Note: See TracTickets for help on using tickets.