[m-dev.] Odd error from the compiler

Ralph Becket rafe at cs.mu.OZ.AU
Thu Jun 19 04:20:28 AEST 2003


Peter Moulder, Wednesday, 18 June 2003:
> On Mon, Jun 16, 2003 at 12:18:11PM +1000, Ralph Becket wrote:
> 
> > I never introduced a variable called TypeInfo_39 and I don't know why
> > the compiler failed to ensure it was instantiated at that point (of
> > course, I could go wading around the compiler internals, but I think
> > that would be asking a bit much of most users.)
> 
> Could a "normal" user work it out by looking at --dump-hlds <something>
> output?  Would it be reasonable for error messages mentioning
> compiler-introduced variables to suggest that the user look at that?

No way - Joe User should not be expected to pore over intermediate
representations of the program that happen to be generated by the
compiler of the day.  HLDS dumps are there for debugging the *compiler*,
not users' programs.

> > Something that told me what I'd done wrong!
> 
> Of course I agree that would be better in the longer term, or if it can
> be done easily.  Mercury compiler error messages are sometimes quite
> daunting at the moment.  Addressing this may be valuable for getting
> Mercury taught to undergrads or perhaps more generally for attracting
> new users.  It isn't near the top of my own wishlist, FWIW.

For my money, Mercury has (apart from a few odd cases...) the most
helpful error reporting of any compiler I've used.  It was one of the
reasons that made me such a fan of the language in the first place.

-- Ralph
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list