anchor.diff:                      | t when t.Equals typeof<decimal>    -> upcast Func<IEqualityComparer,decimal   ,decimal   ,bool>(fun _ x y -> System.Decimal.op_Equality((# "" x:decimal #), (# "" y:decimal #)))
                       | _ -> null
   
  -                let makeEquatableType ty =
  -                    let equatableTypedef = typedefof<IEquatable<_>>
  -                    equatableTypedef.MakeGenericType [|ty|]
  -
  -                let makeReturnType ty =
  -                    let func4Typedef = typedefof<Func<_,_,_,_>>
  -                    func4Typedef.MakeGenericType [| typeof<IEqualityComparer>; ty; ty; typeof<bool> |]
  +                let makeEqualsReturnType ty =
  +                    mos.makeGenericType<Func<_,_,_,_>> [| typeof<IEqualityComparer>; ty; ty; typeof<bool> |]
   
                   let makeEquatableDelegate (ty:Type) (ct:Type) (def:Type) : obj =
                       let concrete = def.MakeGenericType [|ct|]
                       let instance = Activator.CreateInstance concrete
  -                    upcast Delegate.CreateDelegate (makeReturnType ty, instance, "Equals")
  +                    upcast Delegate.CreateDelegate (makeEqualsReturnType ty, instance, "Equals")
   
                   type Calls =
                       static member StructualEqualityEquals<'a when 'a :> IStructuralEquatable> (ec, x:'a, y:'a) = x.Equals (box y, ec) 
  
positive.code:                     elif t.Equals typeof<decimal>    then box (Func<IComparer,decimal   ,decimal   ,int>(fun _ x y -> System.Decimal.Compare((# "" x:decimal #), (# "" y:decimal #))))
                      else null
  
                  let makeComparableType ty =
                      let comparableTypedef = typedefof<IComparable<_>>
                      comparableTypedef.MakeGenericType [|ty|]
  
                  let makeReturnType ty =
                      let func4Typedef = typedefof<Func<_,_,_,_>>
                      func4Typedef.MakeGenericType [| typeof<IComparer>; ty; ty; typeof<int> |]
  
                  let makeCompareDelegate (ty:Type) (ct:Type) (def:Type) : obj =
                      let concrete = def.MakeGenericType [|ct|]
                      let instance = Activator.CreateInstance concrete
                      upcast Delegate.CreateDelegate (makeReturnType ty, instance, "Compare")
  
                  type GenericComparerObj<'a>() =
                      member __.Compare (comp:IComparer, x:'a, y:'a) = comp.Compare (box x, box y)
  
                  let withRelation (_tyRelation:Type) (ty:Type) : obj =
                      let pass0 : obj =
                          standardTypes ty
  
                      match pass0 with
                      | null -> makeCompareDelegate ty ty typedefof<GenericComparerObj<_>>
                      | f -> f
  
  
negative.code:                             // IEquatable<'a>.Equals method.
                              match tyRelation with
                              | r when r.Equals typeof<EquivalenceRelation> ->
                                  if mos.hasFSharpCompilerGeneratedEquality ty then
                                      if ty.IsValueType
                                          then makeEquatableDelegate ty ty typedefof<StructEquatable<DummyStructInterfaces>>
                                          else makeEquatableDelegate ty ty typedefof<RefTypeNullableEquatable<DummyRefTypeInterfaces>>
  