let range_of_index i =
  match i with
    One _ -> 1
  | Many (n1, n2) -> n2 - n1 + 1