I apologize if this is a dumb newbie question. I’m finding the XML Provider very powerful. I can generate a type from a large (static) XML file and then do much with that. My question is - do I have to regenerate that type from the sample file each time I want to run my code, or can I do that once and somehow store the type definition in a file?
Perhaps the overhead of creating it from scratch each time won’t be that bad, but it seems wasteful.
I believe the type information is checked/generated at compile time. It’s not necessary to regenerate it each time the program is run.
…so used to running scripts, wasn’t even thinking that eventually I can run this compiled.
Thank you Horace!
There is no “eventually”. F# is a compiled language. This is true even when you run it from a script. Unlike a truly scripted language, the source must pass the compiler without error before it can execute. This includes type providers, which is a means the compiler uses to generate types based on other information than F# source.