      Returns true if a key with the given type, name, and container exists.
     */
     public static func exists<T, N: Hashable, C: Hashable, M>(type: T.Type, name: N, container: C, metafilter: @escaping Metafilter<M>) -> Bool {
-        return exists(key: Key(type: type, name: name, container: container), metafilter: metathunk(metafilter))
+        return exists(key: AnyKey(type: type, name: name, container: container), metafilter: metathunk(metafilter))
     }
 
     /**
      Returns true if a key with the given type, name, and container exists.
      */
     public static func exists<T, N: Hashable, C: Hashable>(type: T.Type, name: N, container: C) -> Bool {
-        return exists(key: Key(type: type, name: name, container: container))
+        return exists(key: AnyKey(type: type, name: name, container: container))
     }
     
     /**

    /**
     Resolve multiple registrations at the same time.
     
     - returns: A dictionary mapping the keys to their resolved dependencies.
    */
    public static func resolve<T, K: Sequence>(keys: K, parameter: Any = (), cached: Bool? = nil) -> [Key: T] where K.Iterator.Element == Key {
        let type = String(reflecting: T.self)
        let dependencies: [Key: Dependency] = lock.read {
            var dependencies = [Key: Dependency]()
            for (key, dependency) in registrations {
                if type != key.type { continue }
                if !keys.contains(key) { continue }
                dependencies[key] = dependency
            }

        - instance: The instance to register.
        - name: The name under which to register the block.
        - container: The container in which to register the block.
        - metadata: Arbitrary metadata associated with this registration.
    */
    public static func register<T, N: Hashable, C: Hashable>(instance: T, name: N, container: C, metadata: Any = ()) -> Key<T> {
        return register(key: Key(name: name, container: container), metadata: metadata, cached: true) { instance }
    }
    
    /**
     Register an instance.
     
     - returns: The unique `Key` for this registration.
     
     - parameters:
         - instance: The instance to register.
         - name: The name under which to register the block.
         - metadata: Arbitrary metadata associated with this registration.
     
     - note: The registration is made in the default container, `Name.default`.
    */
    public static func register<T, N: Hashable>(instance: T, name: N, metadata: Any = ()) -> Key<T> {
        return register(key: Key(name: name, container: Name.default), metadata: metadata, cached: true) { instance }
    }
    
    /**
     Register an instance.
     
     - returns: The unique `Key` for this registration.
     
     - parameters:
         - instance: The instance to register.
         - container: The container in which to register the block.
         - metadata: Arbitrary metadata associated with this registration.
     
     - note: The registration is made with the default name, `Name.default`.
    */
    public static func register<T, C: Hashable>(instance: T, container: C, metadata: Any = ()) -> Key<T> {
        return register(key: Key(name: Name.default, container: container), metadata: metadata, cached: true) { instance }
    }
    
    /**
     Register an instance.
     
     - returns: The unique `Key` for this registration.
     
     - parameters:
         - instance: The instance to register.
         - metadata: Arbitrary metadata associated with this registration.
     
     - note: The registration is made with the default name, `Name.default`, and in the default container, `Name.default`.
     */
    public static func register<T>(instance: T, metadata: Any = ()) -> Key<T> {
        return register(key: Key(name: Name.default, container: Name.default), metadata: metadata, cached: true) { instance }
    }
    
    /**
     Resolve a dependency registered with `key`.
     
     - returns: The resolved dependency or `nil` if it is not found.
     
