swap minView/maxView return value
|Reported by:||jpbernardy||Owned by:||jpbernardy|
|Type of failure:||Test Case:|
|Related Tickets:||Differential Revisions:|
Description (last modified by jpbernardy)
Some time ago (before ghc 6.6 / base 2.0 release), I introduced minView and maxView in Data.Set and Data.Map (at a user's request). I agreed with Robert Dockins to implement the same functionality as in his version of the Edison library. Unfortunately, I uselessly swapped the return values of minView and maxView, introducing a difference both with the corresponding functions in the edison library and similar functions in Data.Map/Set.
I propose to restore the symmetry, at the cost of incompatibility.
New proposed types:
minView,maxView:: Monad m => Set a -> m (a, Set a)
minViewWithKey,maxViewWithKey :: Monad m => Map k a -> m ((k,a), Map k a)
minView,maxView :: Monad m => Map k a -> m (a, Map k a)
The incompatibility is probably acceptable because the functions are still short-lived.
Change History (10)
comment:3 Changed 8 years ago by jpbernardy
- Milestone changed from 6.8 to 6.6.1
- Type changed from feature request to bug
comment:4 Changed 8 years ago by igloo
- Milestone changed from 6.6.1 to 6.8
- Type changed from bug to proposal
Changed 8 years ago by jpbernardy
comment:5 Changed 8 years ago by jpbernardy
- Resolution set to fixed
- Status changed from new to closed