Singular complete integrability