File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -1705,12 +1705,16 @@ prop_fromSet keys funF =
17051705
17061706prop_fromSetA_action_order :: [Int ] -> Fun Int A -> Property
17071707prop_fromSetA_action_order keys funF =
1708- let iSet = IntSet. fromList keys
1708+ let set = IntSet. fromList keys
1709+ setList = IntSet. toList set
17091710 f = apply funF
17101711 action = \ k ->
17111712 let v = f k
17121713 in tell [v] $> v
1713- in execWriter (fromSetA action iSet) === List. map f (IntSet. toList iSet)
1714+ (writtenMap, writtenOutput) = runWriter (fromSetA action set)
1715+ in
1716+ writtenOutput === List. map f setList .&&.
1717+ toList writtenMap === fmap (id &&& f) setList
17141718
17151719newtype Identity a = Identity a
17161720 deriving (Eq , Show )
Original file line number Diff line number Diff line change @@ -1699,12 +1699,16 @@ prop_fromSet keys funF =
16991699
17001700prop_fromSetA_action_order :: [OrdA ] -> Fun OrdA B -> Property
17011701prop_fromSetA_action_order keys funF =
1702- let iSet = Set. fromList keys
1702+ let set = Set. fromList keys
1703+ setList = Set. toList set
17031704 f = apply funF
17041705 action = \ k ->
17051706 let v = f k
17061707 in tell [v] $> v
1707- in execWriter (fromSetA action iSet) === List. map f (Set. toList iSet)
1708+ (writtenMap, writtenOutput) = runWriter (fromSetA action set)
1709+ in
1710+ writtenOutput === List. map f setList .&&.
1711+ toList writtenMap === fmap (id &&& f) setList
17081712
17091713prop_fromArgSet :: [(OrdA , B )] -> Property
17101714prop_fromArgSet ys =
You can’t perform that action at this time.
0 commit comments