 }
 
 extension Tag: CustomStringConvertible {
+    /// A textual representation of this tag.
     public var description: String {
         return name.rawValue
     }
 }
 
 extension Tag: Hashable {
+    /// :nodoc:
     public var hashValue: Int {
         return name.hashValue
     }
 
+    /// :nodoc:
     public static func == (lhs: Tag, rhs: Tag) -> Bool {
         return lhs.name == rhs.name
     }
 }
 
 extension Tag.Name: ExpressibleByStringLiteral {
+    /// :nodoc:
     public init(stringLiteral value: String) {
         self.rawValue = value
     }
 }
 
 extension Tag.Name: Hashable {
+    /// :nodoc:
     public var hashValue: Int {
         return rawValue.hashValue
     }
 
+    /// :nodoc:
     public static func == (lhs: Tag.Name, rhs: Tag.Name) -> Bool {
         return lhs.rawValue == rhs.rawValue
     }

#endif
import Foundation

public final class Tag {
    public struct Name: RawRepresentable {
        public let rawValue: String
        public init(rawValue: String) {
            self.rawValue = rawValue
        }
    }

    public static var implicit: Tag {
        return Tag(.implicit)
    }

    public init(_ name: Name,
                _ resolver: Resolver = .default,
                _ constructor: Constructor = .default) {

        self.name = name
    }

    /// Lens returning a copy of the current `Tag` with the specified overridden changes.
    ///
    /// - note: Omitting or passing nil for a parameter will preserve the current `Tag`'s value in the copy.
    ///
    /// - parameter name:        Overridden tag name.
    /// - parameter resolver:    Overridden resolver.
    /// - parameter constructor: Overridden constructor.
    ///
    /// - returns: A copy of the current `Tag` with the specified overridden changes.
    public func copy(with name: Name? = nil, resolver: Resolver? = nil, constructor: Constructor? = nil) -> Tag {
        return .init(name ?? self.name, resolver ?? self.resolver, constructor ?? self.constructor)
    }
