anchor.diff:      {new Up<'w, 'w> () with
         member u.Up w =
           {new Zipper<'w, 'w> () with
  +          member z.DownHeadAny () = down.DownHeadAny (u, w)
  +          member z.DownHeadThe () = down.DownHeadThe (u, w)
  +          member z.DownLastAny () = down.DownLastAny (u, w)
  +          member z.DownLastThe () = down.DownLastThe (u, w)
  +          member z.NextAny () = None
  +          member z.NextThe () = None
  +          member z.PrevAny () = None
  +          member z.PrevThe () = None
             member z.Get () = w
  -          member z.Set w = u.Up w
  -          member z.Up () = None
  -          member z.DownFirst () = down.DownFirst (u, w)
  -          member z.DownLast () = down.DownLast (u, w)
  -          member z.Left () = None
  -          member z.Right () = None} :> Zipper<_>}
  +          member z.Set w = match u.Up w with
  +                            | :? Zipper<'w, 'w> as z -> z
  +                            | _ -> failwith "Bug"
  +          member z.Up () = None} :> Zipper<_>}
   
     member z.Down () =
       let r = ref (Unchecked.defaultof<Down<_, _>>)
       {new Rec<Down<'w, 'h>> () with
         member t.Get () =
           {new Down<_, _> () with
  -          member d.DownFirst (up, h) = (!r).DownFirst (up, h)
  -          member d.DownLast (up, h) = (!r).DownLast (up, h)}
  +          member d.DownHeadAny (up, h) = (!r).DownHeadAny (up, h)
  +          member d.DownHeadThe (up, h) = (!r).DownHeadThe (up, h)
  +          member d.DownLastAny (up, h) = (!r).DownLastAny (up, h)
  +          member d.DownLastThe (up, h) = (!r).DownLastThe (up, h)}
         member t.Set d = r := d}
   
     member z.Prim (_: Prim<'h>) =
       {new Down<'w, 'h> () with
  -      member d.DownFirst (_, _) = None
  -      member d.DownLast (_, _) = None}
  +      member d.DownHeadAny (_, _) = None
  +      member d.DownHeadThe (_, _) = None
  +      member d.DownLastAny (_, _) = None
  +      member d.DownLastThe (_, _) = None}
   
     member z.Elem (_: Elem<'h, 'sp, 'c, 't>,
                    rotate: Rotate<'l, 'h, 'r, 'sp, 'p>,
  
positive.code:     let downs = Array.ofList downs
      let n = downs.Length
      for i=0 to n-1 do
        if 0 <= i-1 then downs.[i].L <- downs.[i-1]
        if i+1 < n then downs.[i].R <- downs.[i+1]
      let downFirst = downs.[0]
      let downLast = downs.[n-1]
      {new Down<'w, 't> () with
        member d.DownFirst (up, t) =
          let mutable p = m.ToProduct t
          downFirst.Down (up, m, &p) |> Some
        member d.DownLast (up, t) =
          let mutable p = m.ToProduct t
          downLast.Down (up, m, &p) |> Some}
  
    member z.Case (_: Case<Empty, 'cs, 'u>) : UnionDown<'w, Empty, 'cs, 'u> =
      U [{new Down<'w, 'u> () with
           member d.DownFirst (_, _) = None
           member d.DownLast (_, _) = None}]
  
    member z.Case (m: Case<'ls, 'cs, 'u>,
                   downs: ProductDown<'w, 'ls, 'ls, 'cs, 'ls, 'u>)
  
negative.code:                   U u: UnionDown<'w, 'c, 'c, 'u>) : Down<'w, 'u> =
      let cs = Array.ofList u
      {new Down<'w, 'u> () with
        override d.DownHeadAny (up, u) = cs.[m.Tag u].DownHeadAny (up, u)
        override d.DownHeadThe (up, u) = cs.[m.Tag u].DownHeadThe (up, u)
        override d.DownLastAny (up, u) = cs.[m.Tag u].DownLastAny (up, u)
        override d.DownLastThe (up, u) = cs.[m.Tag u].DownLastThe (up, u)}
  
    member r.Nest (r0: Rotate<'l, 'h, 'r, 'sp, 'p>) =
      {new Rotate<And<'l0, 'l>, 'h, 'r, 'sp, And<'l0, 'p>> () with
  