anchor.diff:                           vars))
                      (HashEqMap.empty, [])
                  |> fun (apps, vars) ->
  +                  // Classify types that had a type variable at the
  +                  // classification position using the remaining positions.
                     let vars = build' ats vars
  +
  +                  // Were some types classified distinct from others at the
  +                  // position `at`?
                     if HashEqMap.isEmpty apps then
  +                    // No, just produce whatever we get from classifying the
  +                    // types that had a variable at the examined position.
                       force vars
                     else
  +                    // Yes, so we produce a branch node.
                       (at,
                        apps
                        |> HashEqMap.map
                            (fun (n, tyds) ->
  -                            build'
  -                             (List.init n (fun i -> i::at) @ ats)
  -                             tyds),
  +                            // Add the new positions in these types to the
  +                            // sequence of positions to classify types against.
  +                            let ats = List.init n (fun i -> i::at) @ ats
  +                            build' ats tyds),
                        vars) |> Branch
   
     /// Builds a type tree corresponding to the given association sequence.
  
positive.code: /// `T<A, U<[B]>>`.
  type TyCursor = list<int>
  
  /// Examines the structure of the given type to determine whether the type has
  /// that position and, if so, returns the type at that position.
  let rec getAt is ty =
    match is with
     | [] ->
       Some ty
     | i::is ->
       match getAt is ty with
        | Some (App (_, args)) when i < args.Length ->
          Some args.[i]
        | _ ->
          None
  
  /// Represents a mapping of types to values of type `'r` such that given a type,
  /// the type value pairs of the mapping can be filtered based on the given type
  /// and produced in an order from more specific to less specific types with
  
negative.code: 
    /// Returns a sequence values from the type tree whose associated types may
    /// unify with the given type.
    let rec filter (formal: TyTree<'r>) (actual: Ty) : seq<'r> = seq {
      match force formal with
       | Empty -> ()
       | One r -> yield r
       | Many rs -> yield! rs
       | Branch (at, apps, vars) ->
         // Does the `actual` type have some non-var type at the branch position?
         match getAt at actual with
          | None | Some (Var _) ->
            // No, so we can't filter out `apps` types at this branch.
            yield! HashEqMap.toSeq apps
                   |> Seq.collect (fun (_, formal) ->
                      filter formal actual)
          | Some (App (tc, args)) ->
            // Yes, so we need only produce those `apps` that have the same tycon.
            match HashEqMap.tryFind tc apps with
             | None -> ()
             | Some formal ->
               yield! filter formal actual
         // We also need to produce the `vars` types.
         yield! filter vars actual
    }
  
  ////////////////////////////////////////////////////////////////////////////////
  
  