anchor.diff:  
     let rec ruleClassesOf t =
       if hasRules t
  -    then t :: ruleClassesOf t.BaseType
  +    then rulesTy t :: ruleClassesOf t.BaseType
       else []
   
     let rulesOf o (t: Type) =
  +    let t = tyOfRulesTy t
       t.GetMethods BindingFlags.AnyDeclaredInstance
       |> Array.filter (fun r -> not r.IsAbstract)
       |> Array.map (fun r ->
  
positive.code:     else
        let search () =
           let limit = limit - 1
           RuleSet.rulesFor rules ty
           |> Seq.collect (fun rule ->
              let rule = Rule.freshVars rule
  
negative.code:               trees = Dictionary<_, _> ()}
       rules = HashEqSet.empty
       tree = TyTree.build []}
  
    let addRules tys ruleSet =
      let rules =
        tys
        |> List.fold (fun r t -> HashEqSet.add t r) ruleSet.rules
      let tree =
        match ruleSet.cache.trees.TryGetValue rules with
         | (true, tree) -> tree
         | (false, _) ->
           let tree =
             lazy (rules
                   |> HashEqSet.toSeq
                   |> Seq.collect (fun t ->
                      ruleSet.cache.rules.[t]
                      |> Seq.map (fun rule -> (rule.ReturnType, rule)))
                   |> TyTree.build
                   |> force)
           ruleSet.cache.trees.Add (rules, tree)
           tree
      {ruleSet with rules = rules; tree = tree}
  
    let maybeAddRulesTy ty ruleSet =
      match ty with
       | App' (Def tc, _) when not tc.IsAbstract
                            && not <| HashEqSet.contains tc ruleSet.rules ->
         if ruleSet.cache.rules.ContainsKey tc |> not then
           let rules =
             tc.GetConstructors ()
             |> Array.map (fun c ->
                let returnType = Ty.ofType tc
                let parTypes =
                  lazy (c.GetParameters ()
                        |> Array.map (fun p -> Ty.ofType p.ParameterType))
                let genArgs =
                  lazy if tc.ContainsGenericParameters
                       then tc.GetGenericArguments () |> Array.map Ty.ofType
                       else [||]
                {new Rule<Type> with
                  member t.ReturnType = returnType
                  member t.ParTypes = parTypes.Force ()
                  member t.GenericArgTypes = genArgs.Force ()
                  member t.Invoke (genArgTys, argTys, argObjs) =
                   let tc = if tc.ContainsGenericParameters
                            then tc.MakeGenericType genArgTys
                            else tc
                   match tc.GetConstructor argTys with
                    | null -> failwith "Bug"
                    | c ->
                      match c.Invoke argObjs with
                       | null -> None
                       | o -> Some o})
           ruleSet.cache.rules.Add (tc, rules)
         addRules [tc] ruleSet
       | _ ->
         ruleSet
  
    let maybeAddRulesObj (o: obj) ruleSet =
      match o with
  