 
   @public mutating func decode<
     G : Generator where G.Element == CodeUnit
-  >(inout input: G) -> UTFDecodeResult {
+  >(inout input: G) -> UnicodeDecodingResult {
     if _lookaheadFlags & 0b01 != 0 {
       return .EmptyInput
     }

  /// units than required for this scalar.
  mutating func _decodeOne<
    G : Generator where G.Element == CodeUnit
  >(inout input: G) -> (UTFDecodeResult, Int) {
    let result = decode(&input)
    switch result {
    case .Result(let us):

// Conversions between different Unicode encodings.  Note that UTF-16 and
// UTF-32 decoding are *not* currently resilient to erroneous data.

enum UnicodeDecodingResult {
  case Result(UnicodeScalar)
  case EmptyInput
  case Error
