 
 	/// Returns the command matching the given verb, or nil if no such command
 	/// is registered.
-	public subscript(verb: String) -> AnyCommand<ClientError>? {
+	public subscript(verb: String) -> CommandWrapper<ClientError>? {
 		return commandsByVerb[verb]
 	}
 }


/// Maintains the list of commands available to run.
public final class CommandRegistry<ClientError: ErrorType> {
	private var commandsByVerb: [String: AnyCommand<ClientError>] = [:]

	/// All available commands.
	public var commands: [AnyCommand<ClientError>] {
		return commandsByVerb.values.sort { return $0.verb < $1.verb }
	}


}

/// A type-erased command.
public struct CommandWrapper<ClientError: ErrorType> {
	public let verb: String
	public let function: String
	
