Represent intervals internally with an interval type instead of tuples.