let of_range_list l = let f acc (x,y) = if x <= y then (Range.make_unsafe x y)::acc else acc in to_canonical (List.fold ~f ~init:[] l)