Created
September 6, 2013 05:02
-
-
Save troykershaw/6459750 to your computer and use it in GitHub Desktop.
A reproduction of the XML Type Provider issue raised on Stack Overflow (see url at end). Essentially, DomainTypes appear in IntelliSense, but the compiler gives an **Error FS0039: The type 'Ul' is not defined (FS0039)** error, and the same thing for 'Li'. http://stackoverflow.com/questions/18453911/type-provider-not-recognized-when-building-project
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module XmlTypeProviderIssue | |
open System | |
open FSharp.Data | |
type Html = XmlProvider<""" | |
<div> | |
<span> | |
<ul> | |
<li/> | |
</ul> | |
</span> | |
</div>"""> | |
let html = Html.GetSample() | |
// Div is defined | |
let divWorks (div:Html.DomainTypes.Div) = () | |
// Span is defined | |
let spanWorks (span:Html.DomainTypes.Span) = () | |
// Ul is not | |
let ulBreaks (ul:Html.DomainTypes.Ul) = () | |
// and neither is Li | |
let liBreaks (li:Html.DomainTypes.Li) = () |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment