   ChannelTypeAsChan<T,C> disguises any ChannelType as a Chan<T>, for use by Sender<T>
 */
 
-private class ChannelTypeAsChan<T, C: ChannelType where C.Element == T>: Chan<T>
+private class ChannelTypeAsChan<T, C: SelectableChannelType where C.Element == T>: Chan<T>
 {
   private var wrapped: C
 

  override func close()  { wrapped.close() }

  override func put(newElement: T) -> Bool { return wrapped.send(newElement) }
}

  override func close()  { wrapped.close() }

  override func put(newElement: T) -> Bool { return wrapped.put(newElement) }

  override func selectPut(select: ChannelSemaphore, selection: Selection) { wrapped.selectPut(select, selection: selection) }
  override func insert(selection: Selection, newElement: T) -> Bool { return wrapped.insert(selection, newElement: newElement) }
}

/**
  SenderTypeAsChan<T,C> disguises any SenderType as a Chan<T>, for use by Sender<T>
*/

private class SenderTypeAsChan<T, S: SelectableSenderType where S.SentElement == T>: Chan<T>
{
  private var wrapped: S

  init(_ sender: S)
  {
    wrapped = sender
  }
