fun registerEnum(arg: Arg){
        when(enums[arg.name]){
            null -> enums[arg.name] = arg
            arg -> { /* noop */ }
            else -> throw IllegalStateException("Another enum with the name ${arg.name} already exists! Enums have to use unique names. If you want to use an enum in multiple places, use mixins to define them.")