 extension DotSeparatedValues : Equatable {
 }
 
-func ==(lhs: DotSeparatedValues, rhs: DotSeparatedValues) -> Bool {
+public func ==(lhs: DotSeparatedValues, rhs: DotSeparatedValues) -> Bool {
     return lhs.values == rhs.values
 }
 
 extension DotSeparatedValues : Comparable {
 }
 
-func <(lhs: DotSeparatedValues, rhs: DotSeparatedValues) -> Bool {
+public func <(lhs: DotSeparatedValues, rhs: DotSeparatedValues) -> Bool {
     for (lvalue, rvalue) in zip(lhs.values, rhs.values) {
         if lvalue == rvalue {
             continue

}

extension Version : CustomStringConvertible {
    var description: String {
        var description = "\(self.major).\(self.minor).\(self.patch)"
        if let prerelease = self.prerelease {
            description += "-\(prerelease)"

}

extension DotSeparatedValues : ArrayLiteralConvertible {
    public init(arrayLiteral elements: String...) {
        self.init(values: elements)
    }
}

extension DotSeparatedValues : StringLiteralConvertible {
    public init(unicodeScalarLiteral value: String) {
        self.init(string: value)
    }
    
    public init(extendedGraphemeClusterLiteral value: String) {
        self.init(string: value)
    }
    
    public init(stringLiteral value: String) {
        self.init(string: value)
    }
}

extension DotSeparatedValues : CustomStringConvertible {
    public var description: String {
        return self.values.joinWithSeparator(".")
    }
}

public struct Version {
    // https://github.com/sindresorhus/semver-regex
    static let versionNumberPattern = "(?:0|[1-9][0-9]*)"
    static let prereleasePattern = "(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)"
    static let buildMetadataPattern = "(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)"
    static let semanticVersioningPattern = "\\A(\(versionNumberPattern))\\.(\(versionNumberPattern))\\.(\(versionNumberPattern))(\(prereleasePattern)?)(\(buildMetadataPattern)?)\\z"
    
    public let major: Int
    public let minor: Int
    public let patch: Int
    public let prerelease: DotSeparatedValues?
    public let buildMetadata: DotSeparatedValues?
    
    public init(major: Int, minor: Int, patch: Int, prerelease: DotSeparatedValues? = nil, buildMetadata: DotSeparatedValues? = nil) {
        self.major = major
        self.minor = minor
        self.patch = patch
