let root ~base p = match (base, p) with | ((`Abs, bsegs), p) -> (match not_above_root p with | (`Abs, psegs) -> abs_of_segs (bsegs @ psegs))