 }
 
 extension Decimal {
-  @available(swift, obsoleted: 4, message: "Please use arithmetic operators instead")
-  @_transparent
-  public mutating func add(_ other: Decimal) {
-      self += other
-  }
-
-  @available(swift, obsoleted: 4, message: "Please use arithmetic operators instead")
-  @_transparent
-  public mutating func subtract(_ other: Decimal) {
-      self -= other
-  }
-
-  @available(swift, obsoleted: 4, message: "Please use arithmetic operators instead")
-  @_transparent
-  public mutating func multiply(by other: Decimal) {
-      self *= other
-  }
-
-  @available(swift, obsoleted: 4, message: "Please use arithmetic operators instead")
-  @_transparent
-  public mutating func divide(by other: Decimal) {
-      self /= other
-  }
+    @available(swift, obsoleted: 4, message: "Please use arithmetic operators instead")
+    @_transparent
+    public mutating func add(_ other: Decimal) {
+        self += other
+    }
+
+    @available(swift, obsoleted: 4, message: "Please use arithmetic operators instead")
+    @_transparent
+    public mutating func subtract(_ other: Decimal) {
+        self -= other
+    }
+
+    @available(swift, obsoleted: 4, message: "Please use arithmetic operators instead")
+    @_transparent
+    public mutating func multiply(by other: Decimal) {
+        self *= other
+    }
+
+    @available(swift, obsoleted: 4, message: "Please use arithmetic operators instead")
+    @_transparent
+    public mutating func divide(by other: Decimal) {
+        self /= other
+    }
 }
 
 extension Decimal : Strideable {

    public var isSignaling: Bool { return false }
}

extension Decimal : CustomStringConvertible {
    public init?(string: __shared String, locale: __shared Locale? = nil) {
        let scan = Scanner(string: string)
        var theDecimal = Decimal()
        scan.locale = locale
        if !scan.scanDecimal(&theDecimal) {
            return nil
        }
        self = theDecimal
    }

    // Note: In swift-corelibs-foundation, `NSDecimalString(_:_:)` is
    // implemented in terms of `description`; here, it's the other way around.
    public var description: String {
        var value = self
        return NSDecimalString(&value, nil)
    }
}

extension Decimal : _ObjectiveCBridgeable {
    @_semantics("convertToObjectiveC")
    public func _bridgeToObjectiveC() -> NSDecimalNumber {

    }
}

extension Decimal : CustomStringConvertible {
    public init?(string: __shared String, locale: __shared Locale? = nil) {
        let scan = Scanner(string: string)
        var theDecimal = Decimal()
        scan.locale = locale
        if !scan.scanDecimal(&theDecimal) {
            return nil
        }
        self = theDecimal
    }

    // Note: In swift-corelibs-foundation, `NSDecimalString(_:_:)` is
    // implemented in terms of `description`; here, it's the other way around.
    public var description: String {
        var value = self
        return NSDecimalString(&value, nil)
    }
}

extension Decimal : Codable {
    private enum CodingKeys : Int, CodingKey {
        case exponent
        case length
        case isNegative
        case isCompact
        case mantissa
    }

    public init(from decoder: Decoder) throws {
        let container = try decoder.container(keyedBy: CodingKeys.self)
        let exponent = try container.decode(CInt.self, forKey: .exponent)
        let length = try container.decode(CUnsignedInt.self, forKey: .length)
        let isNegative = try container.decode(Bool.self, forKey: .isNegative)
        let isCompact = try container.decode(Bool.self, forKey: .isCompact)

        var mantissaContainer = try container.nestedUnkeyedContainer(forKey: .mantissa)
        var mantissa: (CUnsignedShort, CUnsignedShort, CUnsignedShort, CUnsignedShort,
                       CUnsignedShort, CUnsignedShort, CUnsignedShort, CUnsignedShort) = (0,0,0,0,0,0,0,0)
        mantissa.0 = try mantissaContainer.decode(CUnsignedShort.self)
        mantissa.1 = try mantissaContainer.decode(CUnsignedShort.self)
        mantissa.2 = try mantissaContainer.decode(CUnsignedShort.self)
        mantissa.3 = try mantissaContainer.decode(CUnsignedShort.self)
        mantissa.4 = try mantissaContainer.decode(CUnsignedShort.self)
        mantissa.5 = try mantissaContainer.decode(CUnsignedShort.self)
        mantissa.6 = try mantissaContainer.decode(CUnsignedShort.self)
        mantissa.7 = try mantissaContainer.decode(CUnsignedShort.self)

        self = Decimal(_exponent: exponent,
                       _length: length,
                       _isNegative: CUnsignedInt(isNegative ? 1 : 0),
                       _isCompact: CUnsignedInt(isCompact ? 1 : 0),
                       _reserved: 0,
                       _mantissa: mantissa)
    }

    public func encode(to encoder: Encoder) throws {
        var container = encoder.container(keyedBy: CodingKeys.self)
        try container.encode(_exponent, forKey: .exponent)
        try container.encode(_length, forKey: .length)
        try container.encode(_isNegative == 0 ? false : true, forKey: .isNegative)
        try container.encode(_isCompact == 0 ? false : true, forKey: .isCompact)

        var mantissaContainer = container.nestedUnkeyedContainer(forKey: .mantissa)
        try mantissaContainer.encode(_mantissa.0)
        try mantissaContainer.encode(_mantissa.1)
        try mantissaContainer.encode(_mantissa.2)
        try mantissaContainer.encode(_mantissa.3)
        try mantissaContainer.encode(_mantissa.4)
        try mantissaContainer.encode(_mantissa.5)
        try mantissaContainer.encode(_mantissa.6)
        try mantissaContainer.encode(_mantissa.7)
    }
}

extension Decimal : ExpressibleByFloatLiteral {
    public init(floatLiteral value: Double) {
        self.init(value)
