anchor.diff:        | ExprShape.ShapeCombination(op, args) -> ExprShape.RebuildShapeCombination(op, args |> List.map (generalize abstractions))
   
   
  -let private resolveHoMatch ((solutions: Solution, hoVars:Set<QVar>) as acc) (HoMatch(env, term, (QVar(hoVar) as qhoVar), argPats)): Solution * Set<QVar> =  
  +let private resolveHoMatch ((solutions: Solution, hoVars:Set<QVar>) as acc) (HoMatch(env, term, hoVar, argPats)): Solution * Set<QVar> =  
     // Collect the known alpha-equivalences and solutions 
     let termInstantiations =   
       freeVarsList argPats   
  
positive.code:     |> List.map (fun qa  -> 
          let a = qa.var 
          match env.TryFind qa with  
          | Some (QVar x) -> qa, Expr.Var x  
          | None ->  
              match solutionsGet a solutions with  
              | Some x ->  qa, x  
              | None -> failwith "second order pattern has spillover variable?")  
      |> Map.ofList  
  
negative.code:   | (Patterns.Value(v1), Patterns.Value(v2)) when v1 = v2 -> 
      acc
    | (Patterns.Lambda(pv, pbody), Patterns.Lambda(ev, ebody)) ->
      let env' = env.Add(UntypedVar pv, UntypedVar ev)
      termPartialMatch env' (solutions, hoMatches) pbody ebody
    | AppN(Patterns.Var(hoVar), args), _ when variableMapGet (UntypedVar hoVar) env |> Option.isNone ->
      let newHoMatches = HoMatch (env, term, UntypedVar hoVar, args) :: hoMatches
      solutions, newHoMatches 
    | AppN(lv, rv), StripedAppN(lc, rc) ->
      let newSolutions = termPartialMatch env acc lv lc
      (newSolutions,rv,rc) |||> List.fold2 (termPartialMatch env) 
    | (DerivedPatterns.SpecificCall <@ LET @> (_, _, [pe1; Patterns.Lambda(px, pe2)]), Patterns.Let(ex, ee1, ee2)) ->
      let (solutions', hoMatches') = termPartialMatch env (solutions, hoMatches) pe1 ee1
      let env' = env.Add(UntypedVar px, UntypedVar ex)
      termPartialMatch env' (solutions', hoMatches') pe2 ee2
    | _ -> 
      raise ( NotMatched("No matched", [pat; term]))
  