Skip to content

Commit c311f31

Browse files
committed
Revert unnecessary changes.
1 parent 763ba83 commit c311f31

File tree

2 files changed

+0
-27
lines changed

2 files changed

+0
-27
lines changed

containers-tests/tests/set-properties.hs

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -243,32 +243,6 @@ instance IsInt a => Arbitrary (Set a) where
243243
put i'
244244
pure (fromInt i')
245245

246-
newtype MaybeIntSet = MaybeIntSet (Set (Maybe Int)) deriving (Show)
247-
instance Arbitrary MaybeIntSet where
248-
arbitrary = sized $ \sz0 -> do
249-
sz <- choose (0, sz0)
250-
middle <- choose (-positionFactor * (sz + 1), positionFactor * (sz + 1))
251-
let shift = (sz * (gapRange) + 1) `quot` 2
252-
start = middle - shift
253-
hasNothing <- arbitrary
254-
t <- evalStateT (mkArbSet (step start) sz)
255-
(if hasNothing then Nothing else Just start)
256-
if valid t
257-
then pure $ MaybeIntSet t
258-
else error "Test generated invalid tree!"
259-
where
260-
step start = do
261-
mi <- get
262-
case mi of
263-
Nothing -> do
264-
put $ Just start
265-
pure Nothing
266-
Just i -> do
267-
diff <- lift $ choose (1, gapRange)
268-
let i' = i + diff
269-
put $ Just i'
270-
pure $ Just i'
271-
272246
data TwoSets = TwoSets (Set Int) (Set Int) deriving (Show)
273247

274248
data TwoLists a = TwoLists [a] [a]

containers/src/Data/IntMap/Strict/Internal.hs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -989,7 +989,6 @@ mapKeysWith c f t =
989989
{--------------------------------------------------------------------
990990
Filter
991991
--------------------------------------------------------------------}
992-
993992
-- | \(O(n)\). Map values and collect the 'Just' results.
994993
--
995994
-- > let f x = if x == "a" then Just "new a" else Nothing

0 commit comments

Comments
 (0)