As you know, the text after "///" gets whacked straight into an XMLDoc file under a <summary> tag. That's pretty much the full story. It tends to get used as an anonymous blob in HTML generation and in interactive help in Visual Studio.

Because of this dual use only restricted formatting really makes sense. We do tend to use very simple HTML markup (<b>, <i>, <a>, etc.) in the F# documentation. We figure these can also be read even by human readers who happen to be reading some other formatting of the XML help, e.g. in popup help in Visual Studio. However ideally we would follow a fully standard set of XMLDoc authoring guidelines and take account of this in HTML generation. But for the moment minimalistic embedded HTML is the recommended use of this facility. Of course you can always link to more sophisticated content. (** *) are single-line only and are is used for cross-compiling OCaml code (you can also do multi-line by using ///, but you have to surround the comments by (*F#... F#*), which is annoying). We use a small F# program that loads the generated XML file as an XMLDocument, thereby sanity checking it. Here's the program: <code lang=fsharp> open System.Xml let doc = new XmlDocument() let file = Sys.argv.(1);; printf "Testing %s" file;; doc.Load(file);; </code> HTML generation is enabled on the command-line compiler and in the VS project options by the flags: --generate-html: Generate HTML documentation. --html-output-directory <string>: Output directory for HTML documentation. --html-css <string>: Set the name of the Cascading Style Sheet for HTML docs. --html-namespace-file <string>: Set the name of the master namespaces.html file assumed to be in the output directory. --html-namespace-file-append: Append to the master namespace file when generating HTML documentation. The main thing with HTML generation is that you should take a copy of the msdn.css stylesheet in order to get good looking docs. If you have feature requests for HTML generation please let us know. Don

By on 9/29/2006 3:13 PM ()

Well, I've just been though another round with the documentation generator. Here are a few thoughts.

  • Sometimes method and type definitions just wont turn up in the documentation. I cannot figure out why. I'm naughty and dont use interface files, perhaps thats the reason?
  • It would be nice if there was some way to specify a short module description, used in the namespace documentation, and a longer description used in the actual module documentation
  • It would also be nice if you could document the options on variant types. Havent tried it, but fields of records etc as well.
  • I have my project split into two seperate dll's but I want all the documentation together. I've put a hack into to build everything togther for the time being, but I imagine there's a better way.
  • It seems if you put "///////..." in the source then that becomes a documentation comment. Might be better if it would only accept "///" as documentation comments.
  • From a OCaml compatibility point of view it would be nice if (** *) could span multiple lines.

Cheers,

Andy

By on 12/11/2006 3:34 PM ()

RE: definitions just wont turn up in the documentation.

Can you sent examples of this to fsbugs@...

The last two items are fixed.

Other points logged.

Thanks!

By on 12/12/2006 12:24 PM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper