464 combound (Var ((x, i + k), Ts ---> Same.commit incrT T), lev, n) |
464 combound (Var ((x, i + k), Ts ---> Same.commit incrT T), lev, n) |
465 | incr lev (Free (x, T)) = |
465 | incr lev (Free (x, T)) = |
466 if member (op =) fixed x then |
466 if member (op =) fixed x then |
467 combound (Free (x, Ts ---> Same.commit incrT T), lev, n) |
467 combound (Free (x, Ts ---> Same.commit incrT T), lev, n) |
468 else Free (x, incrT T) |
468 else Free (x, incrT T) |
469 | incr lev (Abs (x, T, body)) = |
469 | incr lev (Abs (x, T, t)) = |
470 (Abs (x, incrT T, Same.commit (incr (lev + 1)) body) |
470 (Abs (x, incrT T, Same.commit (incr (lev + 1)) t) |
471 handle Same.SAME => Abs (x, T, incr (lev + 1) body)) |
471 handle Same.SAME => Abs (x, T, incr (lev + 1) t)) |
472 | incr lev (t $ u) = |
472 | incr lev (t $ u) = |
473 (incr lev t $ Same.commit (incr lev) u |
473 (incr lev t $ Same.commit (incr lev) u |
474 handle Same.SAME => t $ incr lev u) |
474 handle Same.SAME => t $ incr lev u) |
475 | incr _ (Const (c, T)) = Const (c, incrT T) |
475 | incr _ (Const (c, T)) = Const (c, incrT T) |
476 | incr _ (Bound _) = raise Same.SAME; |
476 | incr _ (Bound _) = raise Same.SAME; |