If initially the Hybrid state is "Pure _ [1, 2, 3]", and thread t1 started transition and success in line 76, and then thread t2 started a remove which according to line 66 it will go to SB which is empty so the remove will fail, however the set is not empty.
from @DreamLinuxer
I think the code: https://github.com/iu-parfunc/adaptive-data/blob/master/lockfree-test/src/Data/Concurrent/AdaptiveBag.hs does not preserve correct set semantics.
If initially the Hybrid state is "Pure _ [1, 2, 3]", and thread t1 started transition and success in line 76, and then thread t2 started a remove which according to line 66 it will go to SB which is empty so the remove will fail, however the set is not empty.