anchor.diff:                              | _, null -> +1
                               | _, _ -> x.CompareTo y
   
  +                    type StructuralEquatable<'a when 'a : not struct and 'a : null and 'a :> IStructuralEquatable>() =
  +                        member __.Equals (ec:IEqualityComparer, x:'a, y:'a) =
  +                            match x, y with
  +                            | null, null -> true
  +                            | null, _ | _, null -> false
  +                            | _, _ -> Calls.StructuralEqualityEquals (ec, x, y)
  +
  +                    type Equatable<'a when 'a : not struct and 'a : null and 'a :> IEquatable<'a>>() =
  +                        member __.Equals (_:IEqualityComparer, x:'a, y:'a) = 
  +                            match x, y with
  +                            | null, null -> true
  +                            | null, _ | _, null -> false
  +                            | _, _ -> Calls.EquatableEquals (x, y)
  +
  +                    type Equality<'a when 'a : not struct and 'a : null and 'a : equality>() =
  +                        member __.Equals (_:IEqualityComparer, x:'a, y:'a) = 
  +                            match x, y with
  +                            | null, null -> true
  +                            | null, _ | _, null -> false
  +                            | _, _ -> x.Equals y
  +
                   module DummyTypes =
                       let doNotEat () = raise (Exception "not for eating! these types only exist for getting typedef.")
   
                       [<Struct; CustomComparison; CustomEquality>]
                       type ValueTypeComparableInterfaces =
  -                        interface IStructuralComparable                      with member __.CompareTo (_,_) = doNotEat ()
  -                        interface IComparable<ValueTypeComparableInterfaces> with member __.CompareTo _     = doNotEat ()
  -                        interface IComparable                                with member __.CompareTo _     = doNotEat ()
  +                        interface IStructuralComparable                      with member   __.CompareTo (_,_) = doNotEat ()
  +                        interface IComparable<ValueTypeComparableInterfaces> with member   __.CompareTo _     = doNotEat ()
  +                        interface IComparable                                with member   __.CompareTo _     = doNotEat ()
  +                        override __.Equals _                                                                  = doNotEat ()
  +                        override __.GetHashCode ()                                                            = doNotEat ()
  +
  +                    [<AllowNullLiteral>]
  +                    type RefTypeComparableInterfaces =
  +                        interface IStructuralComparable                    with member   __.CompareTo (_,_) = doNotEat ()
  +                        interface IComparable<RefTypeComparableInterfaces> with member   __.CompareTo _     = doNotEat ()
  +                        interface IComparable                              with member   __.CompareTo _     = doNotEat ()
                           override __.Equals _                                                                = doNotEat ()
                           override __.GetHashCode ()                                                          = doNotEat ()
   
  +                    [<Struct; NoComparison; CustomEquality>]
  +                    type ValueTypeEquatableInterfaces =
  +                        interface IStructuralEquatable                     with member __.Equals (_,_)  = doNotEat ()
  +                                                                                member __.GetHashCode _ = doNotEat ()
  +                        interface IEquatable<ValueTypeEquatableInterfaces> with member __.Equals _      = doNotEat ()
  +
                       [<AllowNullLiteral>]
  -                    type RefTypeComparableInterfaces() =
  -                        interface IStructuralComparable                    with member __.CompareTo (_,_) = doNotEat ()
  -                        interface IComparable<RefTypeComparableInterfaces> with member __.CompareTo _     = doNotEat ()
  -                        interface IComparable                              with member __.CompareTo _     = doNotEat ()
  -                        override __.Equals _                                                              = doNotEat ()
  -                        override __.GetHashCode ()                                                        = doNotEat ()
  -
  -                let nullableStructualComparable  = typedefof<Nullable. StructualComparable<   DummyTypes.ValueTypeComparableInterfaces>>
  -                let nullableComparableGeneric    = typedefof<Nullable. ComparableGeneric<     DummyTypes.ValueTypeComparableInterfaces>>
  -                let nullableComparable           = typedefof<Nullable. Comparable<            DummyTypes.ValueTypeComparableInterfaces>>
  -                let valueTypeStructualComparable = typedefof<ValueType.StructualComparable<   DummyTypes.ValueTypeComparableInterfaces>>
  -                let valueTypeComparableGeneric   = typedefof<ValueType.ComparableGeneric<     DummyTypes.ValueTypeComparableInterfaces>>
  -                let valueTypeComparable          = typedefof<ValueType.Comparable<            DummyTypes.ValueTypeComparableInterfaces>>
  -                let refTypeStructualComparable   = typedefof<RefType.  StructualComparable<   DummyTypes.RefTypeComparableInterfaces>>
  -                let refTypeComparableGeneric     = typedefof<RefType.  ComparableGeneric<     DummyTypes.RefTypeComparableInterfaces>>
  -                let refTypeComparable            = typedefof<RefType.  Comparable<            DummyTypes.RefTypeComparableInterfaces>>
  +                    type RefTypeEquatableInterfaces =
  +                        interface IStructuralEquatable                     with member __.Equals (_,_)  = doNotEat ()
  +                                                                                member __.GetHashCode _ = doNotEat ()
  +                        interface IEquatable<RefTypeEquatableInterfaces>   with member __.Equals _      = doNotEat ()
  +
  +
  +                let nullableStructuralComparable  = typedefof<Nullable. StructuralComparable<DummyTypes.ValueTypeComparableInterfaces>>
  +                let nullableComparableGeneric     = typedefof<Nullable. ComparableGeneric<   DummyTypes.ValueTypeComparableInterfaces>>
  +                let nullableComparable            = typedefof<Nullable. Comparable<          DummyTypes.ValueTypeComparableInterfaces>>
  +                let valueTypeStructuralComparable = typedefof<ValueType.StructuralComparable<DummyTypes.ValueTypeComparableInterfaces>>
  +                let valueTypeComparableGeneric    = typedefof<ValueType.ComparableGeneric<   DummyTypes.ValueTypeComparableInterfaces>>
  +                let valueTypeComparable           = typedefof<ValueType.Comparable<          DummyTypes.ValueTypeComparableInterfaces>>
  +                let refTypeStructuralComparable   = typedefof<RefType.  StructuralComparable<DummyTypes.RefTypeComparableInterfaces>>
  +                let refTypeComparableGeneric      = typedefof<RefType.  ComparableGeneric<   DummyTypes.RefTypeComparableInterfaces>>
  +                let refTypeComparable             = typedefof<RefType.  Comparable<          DummyTypes.RefTypeComparableInterfaces>>
  +
  +                let nullableStructuralEquatable   = typedefof<Nullable. StructuralEquatable< DummyTypes.ValueTypeEquatableInterfaces>>
  +                let nullableEquatable             = typedefof<Nullable. Equatable<           DummyTypes.ValueTypeEquatableInterfaces>>
  +                let nullableEquality              = typedefof<Nullable. Equality<            DummyTypes.ValueTypeEquatableInterfaces>>
  +                let valueTypeStructuralEquatable  = typedefof<ValueType.StructuralEquatable< DummyTypes.ValueTypeEquatableInterfaces>>
  +                let valueTypeEquatable            = typedefof<ValueType.Equatable<           DummyTypes.ValueTypeEquatableInterfaces>>
  +                let valueTypeEquality             = typedefof<ValueType.Equality<            DummyTypes.ValueTypeEquatableInterfaces>>
  +                let refTypeStructuralEquatable    = typedefof<RefType.  StructuralEquatable< DummyTypes.RefTypeEquatableInterfaces>>
  +                let refTypeEquatable              = typedefof<RefType.  Equatable<           DummyTypes.RefTypeEquatableInterfaces>>
  +                let refTypeEquality               = typedefof<RefType.  Equality<            DummyTypes.RefTypeEquatableInterfaces>>
   
               type private EquivalenceRelation = class end
               type private PartialEquivalenceRelation = class end
  
positive.code:                     let pass2 =
                          match pass1 with
                          | null ->
                              if t.IsValueType then make typedefof<StructGetHashCode<GenericSpecializeEquals.DummyStructInterfaces>>
                              elif t.IsSealed  then make typedefof<RefTypeNullableGetHashCode<GenericSpecializeEquals.DummyRefTypeInterfaces>>
                              else null
                          | f -> f
  
  
negative.code:                     upcast Delegate.CreateDelegate (makeGetHashCodeReturnType ty, instance, "GetHashCode")
  
                  type Calls =
                      static member StructuralEqualityGetHashCode<'a when 'a :> IStructuralEquatable> (ec, x:'a) = x.GetHashCode (ec) 
                      
                  type NullableStructuralEquality<'a when 'a : struct and 'a : (new : unit ->  'a) and 'a :> ValueType and 'a :> IStructuralEquatable>() =
                      member __.GetHashCode (ec:IEqualityComparer, x:Nullable<'a>) =
                          if x.HasValue then Calls.StructuralEqualityGetHashCode<'a> (ec, x.Value)
                          else 0
  
                  type NullableGetHashCode<'a when 'a : struct and 'a : (new : unit ->  'a) and 'a :> ValueType and 'a : equality>() =
  