This is not possible using standard methods. I tried to look back, but could not find the canonical link, but this is a known limitation, and there were various proposals to remove the limitation.
Ross McKinlay has a somewhat extreme project
provider such as Mixin , which works around this, actually creating an F # source code file when the provider type (and you can include this file in your project). This may be more code generation than a type provider, but
talking about the topic is also a good explanation of some limitations.
How to solve this very much depends on the type of supplier’s goal. If you need only a limited number of types, you can use something like static parameters and write A<"int"> or A<"string"> . You can also mix regular non-generic generic types with non-generic types (in a sense). But I think you need to write more about your specific use case in order to get a better answer.
source share