#1 introduces an internal macro @generate_backend_type MyBackendType that generates an AbstractBackend subtype called MyBackendType. The only thing missing is also generating the string macro MyBackendType"LAPACK" for constructing variants of the backend type, I couldn't figure out how to get that working.