I'd like to do the following:
let allTypes = AllTypes (t, assemblies)
... where AllTypes
is a type provider, the properties of which are instances of all types in the given array of assemblies that subclass type t
. (All of the types have a single constructor that takes no arguments.)
Is this doable using F# type providers? I have no experience creating my own provider, and I don't want to waste my time attempting to do this if it isn't feasible.
I'd greatly appreciate any links to pages that would get me started coding this.
there's a lot of activity going on in the FSharp.Data github repo. There is a learning curve, but tuning into that repo might be useful.
Beyond that, this intro tutorial covers some of the basics, and here's a Type Provider starter pack that's been prepared by the F# open source community.
The fsharp.org site, and this projects page covers a cross-section of what's going on (including type providers).
You could take the list that Mark suggests here and turn it into a type provider. I think an exploratory way of interacting with namespaces would be useful. Why not? I'd use it. Please publish on GitHub if you get around to it.