Modified Ref type to be Abs x | Rel Int, and to use an Enum instance for fast addition.