[mercury-users] Off-topic: IDE/compiler trade-off

Jonathan Morgan jonmmorgan at gmail.com
Wed Jan 10 00:04:45 AEDT 2007


On 1/9/07, Julien Fischer <juliensf at csse.unimelb.edu.au> wrote:
>
> On Tue, 9 Jan 2007, Jonathan Morgan wrote:
>
> > On 1/8/07, Ondrej Bojar <obo at cuni.cz> wrote:
> >> Are there any standards on compiler-editor interaction interface?
> >
> > GHC (Haskell) changed from a compiler to a library in order to support
> > Visual Haskell (this then interfaced with Visual Studio through
> > Haskell -> COM bindings).
> >
> > The Mercury way seems to be to add extra options to the compiler,
> > rather than making it a library to be used by other programs (for
> > example, recently generation of XML documentation of some sort was
> > added, as another compiler option).  This would avoid the need for
> > some kind of a cross-language bridge, but might make the interface
> > with the compiler more granular (and thus less useful).
>
> Actually, we support building the compiler as a library - the gcc
> backend required us to do it that way.  The problem with making
> the compiler into the library, as the gcc backend demonstrates,
> is that if the Mercury language changes frequently then the
> compiler internals change almost daily.  Maintaining a consistent
> public interface to various compiler phases would be fairly tricky.
> (Of course the gcc backend got the worst of both worlds since gcc
> also changes fairly frequently.)

Fine.  I'm still not aware of any good FreePascal / Mercury inter-op
support (apart from stabilising a small interface and using
foreign_export).

> (The XML documentation of "some sort" is basically a representation
> of the module interfaces as XML documents with the comments attached
> to the various items - the compiler uses various heuristics to decide
> what comments are attached to which items.  The idea is that you then
> apply a style sheet to the XML documents and get documentation of
> some form.  One of the MC people was working on a syle sheet that would
> convert them to docbook format although I haven't heard anything recently.
> The early output from it look promising; I don't remember if it was posted
> to mercury-users or not.)

While sensible (from memory it was a fairly small change to the
compiler) it is still different from the general approach, which would
have documentation generated by a separate program, often with a
separate parser.

Jon
--------------------------------------------------------------------------
mercury-users mailing list
Post messages to:       mercury-users at csse.unimelb.edu.au
Administrative Queries: owner-mercury-users at csse.unimelb.edu.au
Subscriptions:          mercury-users-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the users mailing list