Skip to content

Commit bbeef19

Browse files
committed
Simplify Arbitrary instance for IntMap
Closes #594
1 parent 4bd9f7a commit bbeef19

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

tests/intmap-properties.hs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -204,10 +204,7 @@ apply3 f a b c = apply f (a, b, c)
204204
--------------------------------------------------------------------}
205205

206206
instance Arbitrary a => Arbitrary (IntMap a) where
207-
arbitrary = do{ ks <- arbitrary
208-
; xs <- arbitrary
209-
; return (fromList (zip xs ks))
210-
}
207+
arbitrary = fmap fromList arbitrary
211208

212209
newtype NonEmptyIntMap a = NonEmptyIntMap {getNonEmptyIntMap :: IntMap a} deriving (Eq, Show)
213210

0 commit comments

Comments
 (0)