 
 /// Maintains the list of commands available to run.
 public final class CommandRegistry<ClientError> {
-	private var commandsByVerb: [String: CommandOf<ClientError>] = [:]
+	private var commandsByVerb: [String: AnyCommand<ClientError>] = [:]
 
 	/// All available commands.
-	public var commands: [CommandOf<ClientError>] {
+	public var commands: [AnyCommand<ClientError>] {
 		return commandsByVerb.values.sort { return $0.verb < $1.verb }
 	}
 

}

/// A type-erased CommandType.
public struct CommandOf<ClientError>: CommandType {
	public let verb: String
	public let function: String
	private let runClosure: CommandMode -> Result<(), CommandantError<ClientError>>


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