   @inline(__always)
   @warn_unused_result
   internal func _advanceForward(
-    i: Index, by n: Index.Distance, limit: Index
+    i: Index, by n: IndexDistance, limit: Index
   ) -> Index {
     _precondition(n >= 0,
       "Only BidirectionalIndexType can be advanced by a negative amount")
 
     var i = i
-    for var offset: Index.Distance = 0; offset != n && i != limit; offset = offset + 1 {
+    for var offset: IndexDistance = 0; offset != n && i != limit; offset = offset + 1 {
       _nextInPlace(&i)
     }
     return i
   }
 
   @warn_unused_result
-  public func advance(i: Index, by n: Index.Distance) -> Index {
+  public func advance(i: Index, by n: IndexDistance) -> Index {
     return self._advanceForward(i, by: n)
   }
 
   @warn_unused_result
-  public func advance(i: Index, by n: Index.Distance, limit: Index) -> Index {
+  public func advance(i: Index, by n: IndexDistance, limit: Index) -> Index {
     return self._advanceForward(i, by: n, limit: limit)
   }
 
   @warn_unused_result
-  public func distanceFrom(start: Index, to end: Index) -> Index.Distance {
+  public func distanceFrom(start: Index, to end: Index) -> IndexDistance {
     var start = start
-    var count: Index.Distance = 0
+    var count: IndexDistance = 0
     while start != end {
       count = count + 1
       _nextInPlace(&start)

  }
}
extension MyForwardCollectionType
  where Index : MyRandomAccessIndex {

  @warn_unused_result
  public func next(i: Index) -> Index {

  subscript(i: Index) -> Generator.Element { get set }
}

public protocol MyIndexType : Equatable {}

public protocol MyIndexRangeType : Equatable {
  associatedtype Index : MyIndexType
  var startIndex: Index { get }
