Section 31. Ex post facto, obligation of contracts, and irrevocable privileges. No ex post facto law nor any law impairing the obligation of contracts, or making any irrevocable grant of special privileges, franchises, or immunities, shall be passed by the legislature.