anchor.diff:    abstract ReturnType: Ty<'v>
     abstract ParTypes: array<Ty<'v>>
     abstract GenericArgTypes: array<Ty<'v>>
  -  abstract Invoke: array<Type> * array<obj> -> option<obj>
  +  abstract Invoke: array<Type> * array<Type> * array<obj> -> option<obj>
   
   module Rule =
     let mapVars v2w (rule: Rule<_>) =
  
positive.code: 
                   if rule.ParTypes.Length <> 0
                      && stack |> List.exists ((=) ty) then
                    if isRec ty || Ty.containsVars ty then
                      Seq.empty
                    else
                      match HashEqMap.tryFind ty objEnv with
                       | Some o ->
                         Seq.singleton (Value o, objEnv, tyEnv)
                       | None ->
                         let recTy = App (Def typedefof<Rec<_>>, [|ty|])
                         tryGen limit reached rules objEnv tyEnv (ty::stack) recTy
                         |> Seq.choose (fun (result, objEnv, tyEnv) ->
                            match result with
                             | Ruled _ -> None
                             | Value recO ->
                               match recO with
                                | :? IRecObj as recO' ->
                                  let o = recO'.GetObj ()
                                  Some (Value o,
                                        objEnv
                                        |> HashEqMap.add recTy recO
                                        |> HashEqMap.add ty o,
                                        tyEnv)
                                | _ ->
                                  failwith "Bug")
                   else
                     match parTys with
                      | [] ->
                        match Ruled (ty, List.rev args |> Array.ofList, rule)
                              |> tryResolveResult objEnv tyEnv with
                         | None ->
                           Seq.empty
                         | Some (objEnv, result) ->
  
                           let objEnv =
                             match result with
                              | Value o ->
                                let recTy = App (Def typedefof<Rec<_>>, [|ty|])
                                match HashEqMap.tryFind recTy objEnv with
                                 | None ->
                                   ()
                                 | Some recO ->
                                   match recO with
                                    | :? IRecObj as recO' ->
                                      recO'.SetObj o
                                    | _ ->
                                      failwith "Bug"
                                objEnv
                                |> HashEqMap.add ty o
                              | Ruled _ ->
                                objEnv
  
                           Seq.singleton (result, objEnv, tyEnv)
                      | parTy::parTys ->
                        Ty.resolve tyEnv parTy
  
negative.code:        lp objEnv 0
         |> Option.bind (fun (objEnv, args) ->
            let ty = Ty.resolve tyEnv ty
            match Ty.toMonoType ty with
             | None ->
               Some (objEnv, Ruled (ty, args, rule))
             | Some monoTy ->
               match Array.chooseAll
                       <| function Value (t, v) -> Some (t, v) | Ruled _ -> None
                       <| args
                     |> Option.map Array.unzip with
                | None ->
                  Some (objEnv, Ruled (ty, args, rule))
                | Some (argTys, argVals) ->
                  match rule.GenericArgTypes
                        |> Array.chooseAll (Ty.resolve tyEnv >> Ty.toMonoType) with
                   | None ->
                     failwith "Bug"
                   | Some genArgTys ->
                     rule.Invoke (genArgTys, argTys, argVals)
                     |> Option.map (fun o ->
                        (HashEqMap.add monoTy o objEnv, Value (monoTy, o))))
  
    let inline isRec ty =
      match ty with
  