Ticket #1953 (closed proposal: wontfix)
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
Change History
Note: See
TracTickets for help on using
tickets.

