anchor.diff:                  | false -> false
   
   #if FX_ATLEAST_40 // should probably create some compilation flag for this stuff
  +            module Exemplars =
  +                module Nullable =
  +                    type StructualComparable<'a when 'a : struct and 'a : (new : unit ->  'a) and 'a :> ValueType and 'a :> IStructuralComparable>() =
  +                        member __.CompareTo (ec:IComparer, x:Nullable<'a>, y:Nullable<'a>) =
  +                            match x.HasValue, y.HasValue with
  +                            | false, false -> 0
  +                            | false, _ -> -1
  +                            | _, false -> +1
  +                            | _, _ -> x.Value.CompareTo (box y.Value, ec)
  +
  +                    type ComparableGeneric<'a when 'a : struct and 'a : (new : unit ->  'a) and 'a :> ValueType and 'a :> IComparable<'a>>() =
  +                        member __.CompareTo (_:IComparer, x:Nullable<'a>, y:Nullable<'a>) =
  +                            match x.HasValue, y.HasValue with
  +                            | false, false -> 0
  +                            | false, _ -> -1
  +                            | _, false -> +1
  +                            | _, _ -> x.Value.CompareTo y.Value
  +
  +                    type Comparable<'a when 'a : struct and 'a : (new : unit ->  'a) and 'a :> ValueType and 'a :> IComparable>() =
  +                        member __.CompareTo (_:IComparer, x:Nullable<'a>, y:Nullable<'a>) =
  +                            match x.HasValue, y.HasValue with
  +                            | false, false -> 0
  +                            | false, _ -> -1
  +                            | _, false -> +1
  +                            | _, _ -> x.Value.CompareTo (box y.Value)
  +
  +                module ValueType =
  +                    type StructualComparable<'a when 'a : struct and 'a :> IStructuralComparable>() =
  +                        member __.CompareTo (ec:IComparer, x:'a, y:'a) = x.CompareTo (box y, ec)
  +
  +                    type ComparableGeneric<'a when 'a : struct and 'a :> IComparable<'a>>() =
  +                        member __.CompareTo (_:IComparer, x:'a, y:'a) = x.CompareTo y
  +
  +                    type Comparable<'a when 'a : struct and 'a :> IComparable>() =
  +                        member __.CompareTo (_:IComparer, x:'a, y:'a) = x.CompareTo y
  +
  +                module RefType = 
  +                    type StructualComparable<'a when 'a : not struct and 'a : null and 'a :> IStructuralComparable>() =
  +                        member __.CompareTo (ec:IComparer, x:'a, y:'a) =
  +                            match x, y with
  +                            | null, null -> 0
  +                            | null, _ -> -1
  +                            | _, null -> +1
  +                            | _, _ -> x.CompareTo (box y, ec)
  +
  +                    type ComparableGeneric<'a when 'a : not struct and 'a : null and 'a :> IComparable<'a>>() =
  +                        member __.CompareTo (_:IComparer, x:'a, y:'a) = 
  +                            match x, y with
  +                            | null, null -> 0
  +                            | null, _ -> -1
  +                            | _, null -> +1
  +                            | _, _ -> x.CompareTo y
  +
  +                    type Comparable<'a when 'a : not struct and 'a : null and 'a :> IComparable>() =
  +                        member __.CompareTo (_:IComparer, x:'a, y:'a) = 
  +                            match x, y with
  +                            | null, null -> 0
  +                            | null, _ -> -1
  +                            | _, null -> +1
  +                            | _, _ -> x.CompareTo 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 ()
  +                        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 ()
  +
  +                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 private EquivalenceRelation = class end
               type private PartialEquivalenceRelation = class end
   
               module mos =
  -                let makeEquatableType ty =
  -                    let equatableTypedef = typedefof<IEquatable<_>>
  -                    equatableTypedef.MakeGenericType [|ty|]
  -
  -                let makeComparableType ty =
  -                    let comparableTypedef = typedefof<IComparable<_>>
  -                    comparableTypedef.MakeGenericType [|ty|]
  -
  -                // TODO: Copy to a Comparable version
  -                let rec tryFindObjectsInterfaceMethod (objectType:Type) (interfaceType:Type) (methodName:string) (methodArgTypes:array<Type>) =
  +                let rec private tryFindObjectsInterfaceMethod (objectType:Type) (interfaceType:Type) (methodName:string) (methodArgTypes:array<Type>) =
                       if not (interfaceType.IsAssignableFrom objectType) then null
                       else
                           let methodInfo = interfaceType.GetMethod (methodName, methodArgTypes) 
  
positive.code:                         match tyRelation with
                          | r when r.Equals typeof<PartialEquivalenceRelation> ->
                              match ty with
                              | t when t.Equals typeof<float>             -> upcast (Func<IEqualityComparer,float,            float,            bool>(fun _ x y -> (# "ceq" x y : bool #)))
                              | t when t.Equals typeof<Nullable<float>>   -> upcast (Func<IEqualityComparer,Nullable<float>,  Nullable<float>,  bool>(fun _ x y ->
                                  match x.HasValue, y.HasValue with
                                  | false, false -> true
                                  | false, _ 
                                  | _, false -> false
                                  | _ -> (# "ceq" x.Value y.Value : bool #)))
                              | t when t.Equals typeof<float32>           -> upcast (Func<IEqualityComparer,float32,          float32,          bool>(fun _ x y -> (# "ceq" x y : bool #)))
                              | t when t.Equals typeof<Nullable<float32>> -> upcast (Func<IEqualityComparer,Nullable<float32>,Nullable<float32>,bool>(fun _ x y ->
                                  match x.HasValue, y.HasValue with
                                  | false, false -> true
                                  | false, _ 
  
negative.code:                             | _ -> null
                          | r when r.Equals typeof<EquivalenceRelation> ->
                              match ty with
                              | t when t.Equals typeof<float>             -> box (Func<IEqualityComparer,float,            float,            bool>(fun _ x y -> if not (# "ceq" x x : bool #) && not (# "ceq" y y : bool #) then true else (# "ceq" x y : bool #)))
                              | t when t.Equals typeof<float32>           -> box (Func<IEqualityComparer,float32,          float32,          bool>(fun _ x y -> if not (# "ceq" x x : bool #) && not (# "ceq" y y : bool #) then true else (# "ceq" x y : bool #)))
                              | t when t.Equals typeof<Nullable<float>>   -> box (Func<IEqualityComparer,Nullable<float>,  Nullable<float>,  bool>(fun _ x y ->
                                  match x.HasValue, y.HasValue with
                                  | false, false -> true
                                  | false, _ 
                                  | _, false -> false
                                  | _ -> if not (# "ceq" x.Value x.Value : bool #) && not (# "ceq" y.Value y.Value : bool #) then true else (# "ceq" x.Value y.Value : bool #)))
                              | t when t.Equals typeof<Nullable<float32>> -> box (Func<IEqualityComparer,Nullable<float32>,Nullable<float32>,bool>(fun _ x y ->
                                  match x.HasValue, y.HasValue with
                                  | false, false -> true
                                  | false, _ 
  