Skip to content

Commit 0959161

Browse files
committed
remove some coercions
1 parent 5ff0726 commit 0959161

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

containers-tests/tests/intmap-strictness.hs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,23 +69,23 @@ prop_strictFromSet :: Func Key (Bot A) -> IntSet -> Property
6969
prop_strictFromSet fun set =
7070
isBottom (M.fromSet f set) === any (isBottom . f) (IntSet.toList set)
7171
where
72-
f = coerce (applyFunc fun) :: Key -> A
72+
f = applyFunc fun
7373

7474
prop_strictFromSetA :: Func Key (Bot A) -> IntSet -> Property
7575
prop_strictFromSetA fun set =
7676
isBottom (getSolo (M.fromSetA f set)) === any (isBottom . getSolo . f) (IntSet.toList set)
7777
where
78-
f = MkSolo . coerce (applyFunc fun) :: Key -> Solo A
78+
f = MkSolo . applyFunc fun
7979

8080
prop_lazyFromSet :: Func Key (Bot A) -> IntSet -> Property
8181
prop_lazyFromSet fun set = isNotBottomProp (L.fromSet f set)
8282
where
83-
f = coerce (applyFunc fun) :: Key -> A
83+
f = applyFunc fun
8484

8585
prop_lazyFromSetA :: Func Key (Bot A) -> IntSet -> Property
8686
prop_lazyFromSetA fun set = isNotBottomProp (getSolo (L.fromSetA f set))
8787
where
88-
f = MkSolo . coerce (applyFunc fun) :: Key -> Solo A
88+
f = MkSolo . applyFunc fun
8989

9090
prop_strictFromList :: [(Key, Bot A)] -> Property
9191
prop_strictFromList kvs =

containers-tests/tests/map-strictness.hs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,23 +133,23 @@ prop_strictFromSet :: Func OrdA (Bot A) -> Set OrdA -> Property
133133
prop_strictFromSet fun set =
134134
isBottom (M.fromSet f set) === any (isBottom . f) (Set.toList set)
135135
where
136-
f = coerce (applyFunc fun) :: OrdA -> A
136+
f = applyFunc fun
137137

138138
prop_strictFromSetA :: Func OrdA (Bot A) -> Set OrdA -> Property
139139
prop_strictFromSetA fun set =
140140
isBottom (getSolo (M.fromSetA f set)) === any (isBottom . getSolo . f) (Set.toList set)
141141
where
142-
f = MkSolo . coerce (applyFunc fun) :: OrdA -> Solo A
142+
f = MkSolo . applyFunc fun
143143

144144
prop_lazyFromSet :: Func OrdA (Bot A) -> Set OrdA -> Property
145145
prop_lazyFromSet fun set = isNotBottomProp (L.fromSet f set)
146146
where
147-
f = coerce (applyFunc fun) :: OrdA -> A
147+
f = applyFunc fun
148148

149149
prop_lazyFromSetA :: Func OrdA (Bot A) -> Set OrdA -> Property
150150
prop_lazyFromSetA fun set = isNotBottomProp (getSolo (L.fromSetA f set))
151151
where
152-
f = MkSolo . coerce (applyFunc fun) :: OrdA -> Solo A
152+
f = MkSolo . applyFunc fun
153153

154154
prop_strictFromArgSet :: Func OrdA (Bot A) -> Set OrdA -> Property
155155
prop_strictFromArgSet fun set =

0 commit comments

Comments
 (0)