   }
 }
 
-extension DeferredError: Equatable {}
-
+#if !swift(>=4.1)
 public func == (a: DeferredError, b: DeferredError) -> Bool
 {
   switch (a,b)

  default:                                     return false
  }
}

///
/// Must be a top-level type because Deferred is generic.

public enum DeferredError: Error, Equatable
{
  case canceled(String)
  case invalid(String)
