<div dir="ltr"><div class="gmail_extra">I have a tangential question related to Sven's new generic features and thought it deserved its own thread.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Would it be possible to expose the compiler's syntax checking as an engine to coding environments?</div><div class="gmail_extra"><br></div><div class="gmail_extra">I find it frustrating that with all the great features add to the compiler (Sven recent generic functions for example) that it takes months or years for them to be properly supported by CodeTools. (I believe CodeTools provides its own parser apart from the compiler)</div><div class="gmail_extra"><br></div><div class="gmail_extra">It is very frustrating to try to use a language feature and with the press of an editor command like Ctrl+Space (for code insight), Ctrl+Shift+C (for code completion), Ctrl+Shift+Up/Down (navigate interface/implementation) I am thrown out of whatever I was doing. Then I'm typically confronted with many CodeTools error complaints, which in fact are not errors, just language enhancements CodeTools has yet been extended to support.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Wouldn't it be possible, or perchance even preferable, if the compiler was exposed as a service? Exposed as a service so that coding environments like the Lazarus IDE (and by extension CodeTools) could use the compilers services service to advise users what is or is not illegal syntax, as well as enhanced code insight, code completion, tooltips, and more?</div><div class="gmail_extra"><br></div><div class="gmail_extra">A quick google for "compiler as IDE service" reveals this is not a new idea in general programming circles:</div><div class="gmail_extra"><br></div><div class="gmail_extra">**This tutorial demonstrates how to use the editor services provided by the compiler. This API is used to provide auto-complete, tool-tips, parameter info help, matching of brackets and other functions in editors including Visual Studio, Xamarin Studio and Emacs.**<br></div><div class="gmail_extra"><br></div><div class="gmail_extra"><a href="http://fsharp.github.io/FSharp.Compiler.Service/editor.html">http://fsharp.github.io/FSharp.Compiler.Service/editor.html</a><br></div><div class="gmail_extra"><br></div><div class="gmail_extra">If they can do it, why can't we?</div><div class="gmail_extra"><br></div><div class="gmail_extra"><br></div></div>