anchor.diff:  
   let private alphaEquals (e1: Expr) (e2: Expr) = e1 = e2
   
  -// TODO 
  -// type QVar = 
  -//   | TypedVar of Var
  -//   | UntypedVar of Var
  -type QVar = 
  -  | QVar of Var
  -
  -  member v.var = let (QVar(v)) = v in v
  -
   type QExpr (expr: Expr) = 
   
     member v.expr = expr
  
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: open types
  open transformer
  open utils
  
  type QVar(var: Var, isTyped: bool) = 
  
    member v.var = var
  
    member v.isTyped = isTyped
    
    override qx.Equals(yobj) = 
      match yobj with
      | :? QVar as qy -> 
        let v1 = qx.var
        let v2 = qy.var
        if qx.isTyped && qy.isTyped then
          v1.Name = v2.Name && v1.Type = v2.Type
        else
          v1.Name = v2.Name
      | _ -> false
  
    override x.GetHashCode() = 
      (x.var.Name.GetHashCode())
  
    interface System.IComparable with
      member qx.CompareTo(yobj: obj) = 
        match yobj with
        | :? QVar as qy -> 
          let eq = qx.Equals(yobj)
          if eq then
            0
          else
            let scmp = qx.var.Name.CompareTo(qy.var.Name)
            if scmp = 0 then
              let tcmp = qx.var.Type.ToString().CompareTo(qy.var.Type.ToString())
              if tcmp = 0 then
                failwithf "comparison of two vars %A, %A failed" (qx.isTyped) (qy.isTyped)
              else
                tcmp
            else
              scmp
        | _ -> -1
  
  let TypedVar var = new QVar(var, true)
  let UntypedVar var = new QVar(var, false)
  
  module metaVars =
    let private makeMetaVar<'a> (name: string) = 
  