# Case on a set ignores equality/inequality

Advertisements Pattern-matching is based on Eq instance, right? I see that Data.Set.Set implements Eq and >S.fromList [] == S.fromList [1,2] False >S.fromList [1,2] == S.fromList [2,1] True which is right. Then why does case S.fromList [1,2] of mempty -> True return true? (actually it always evaluates to true). I mean such matching is wrong and… Read More Case on a set ignores equality/inequality