File tree Expand file tree Collapse file tree 2 files changed +0
-27
lines changed
containers/src/Data/IntMap/Strict Expand file tree Collapse file tree 2 files changed +0
-27
lines changed Original file line number Diff line number Diff 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-
272246data TwoSets = TwoSets (Set Int ) (Set Int ) deriving (Show )
273247
274248data TwoLists a = TwoLists [a ] [a ]
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments