Wednesday, 14 August 2013

DomainTypes in XmlProvider FS0039 not defined

DomainTypes in XmlProvider FS0039 not defined

I am trying to use the FSharp.Data XmlProvider. According to the samples
you can access nested types and create a function that will receive a
parameter of one of those types.
https://github.com/fsharp/FSharp.Data/blob/master/samples/library/XmlProvider.fsx
(line 177)
However when I try to do the following:
type businessesT = XmlProvider<"Businesses.xml">
type businessT = businessesT.DomainTypes.Business
let testfunc (b:businessesT.DomainTypes.Business) =
b
It seems to work until I actually compiles and then I get
error FS0039: The type 'Business' is not defined

No comments:

Post a Comment