The loss of halide and sulphate ions from melting ice