type t = | Pos | Neg let of_nperm nperm = if (nperm land 1) = 1 then Neg else Pos let add_nperm phase = function | 0 -> phase | nperm -> begin match (phase, of_nperm nperm) with | (Pos,Pos) | (Neg,Neg) -> Pos | _ -> Neg end let pp_phase ppf = function | Pos -> Format.fprintf ppf "@[+1@]" | Neg -> Format.fprintf ppf "@[-1@]"