Evolution of the atomic and molecular gas content of galaxies in dark matter haloes | Synapse