[m-dev.] Grade confusion

Mark Brown mark at mercurylang.org
Mon Nov 17 01:24:28 AEDT 2014


On Sun, Nov 16, 2014 at 3:24 PM, Paul Bone <paul at bone.id.au> wrote:
> On Sun, Nov 16, 2014 at 12:37:48PM +1100, Mark Brown wrote:
>> On Sat, Nov 15, 2014 at 5:03 PM, Paul Bone <paul at bone.id.au> wrote:
>> >
>> > Hi,
>> >
>> > I saw this question on stackoverflow.com
>> >
>> > http://stackoverflow.com/questions/26916819/how-do-i-compile-for-debugging-in-mercury-programming-language/26943053#26943053
>> >
>> > I'm pretty sure that adding a grade flag merely adds that grade component
>> > onto the default or specified grade.  So that if my default grade is hlc.gc
>> > and I need to use asm_fast.gc.debug for debugging specifying --debug won't
>> > do what I need.  In this case someone who reads the debugging part of the
>> > user guide which instructs them to use --debug may be confused.
>> >
>> > A number of new users have commented on how Mercury's large number of grades
>> > make things confusing, however that problem is going to take a long time to
>> > solve.  In the interim, I propose changing the user guide.  Any thoughts?
>>
>> I have no idea what you are proposing to change the user guide to.
>
> Rather than simply say "mmc --debug will enable you debugging."  It should
> say that the user should choose a debugging grade and link them to the
> section of the manual about compilation grades.  The problem with the manual
> as it is is that "mmc --debug" sometimes works and sometimes doesn't.

That sounds like a problem with the implementation to me. I think it
should behave as section 7.1 suggests.

Does the documentation say anywhere that the --debug flag merely adds
the .debug grade component?

>
>> The seemingly obvious solution to your problem is for the --debug
>> option to select one of the debug grades that is actually installed,
>> if possible. So there could be two default grades, the usual one and
>> one with debugging. Please don't tell me you think this will take a
>> long time to solve.
>
> That particular solution wouldn't take a long time technically.  It may take
> longer for us to discuss and conclude what flags like --debug or --profiling
> should actually do if they're no-longer grade flags.  (I have a vague
> feeling that we discussed this recently.)
>
> What will take longer is solving the more general confusion that grades
> create.  This first requires us to agree that grades are confusing and
> create problems.

We first need to agree what problem we are discussing. The user you
actually cited doesn't appear to be confused about grades; they're
just wondering why --debug doesn't work the way section 7.1 suggests
it would.

Cheers,
Mark.



More information about the developers mailing list