anchor.diff:              // Remove the nested result.
               bind (uncurry (ignoreContext id)) tResult
           | AUpd (eltype, length, arr, ix, value) ->
  -            // TODO(CaptainHayashi): this is awful.
  -            let originalType = Array (eltype, length, ())
  -
  -            (* Ensure the traversal doesn't change eltype or length to something
  -               we're not expecting, and doesn't change the type of value. *)
  +            // Ensure the traversal doesn't change the type of value.
               let assemble (arr', ix', value') =
  -                // Type-check value.
                   let vt, vt' = typeOf value, typeOf value'
                   if typesCompatible vt vt'
                   then ok (AUpd (eltype, length, arr', ix', value'))
  
positive.code:             |> Context.changePos id sub ctx
              |> bind (uncurry (ignoreContext expectInt))
          | IIdx (eltype, length, arr, ix) ->
              // TODO(CaptainHayashi): this is awful.
              let originalType = Array (eltype, length, ())
  
              (* Ensure the traversal doesn't change eltype or length to something
                 we're not expecting. *)
              let assemble (arr', ix') =
                  ok (IIdx (eltype, length, arr', ix'))
              let tResult =
  
negative.code:             |> Context.changePos id sub ctx
              |> bind (uncurry (ignoreContext expectBool))
          | BIdx (eltype, length, arr, ix) ->
              let assemble (arr', ix') =
                  ok (BIdx (eltype, length, arr', ix'))
              let tResult =
  