guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Improved source properties and errors; => within case


From: Ludovic Courtès
Subject: Re: [PATCH] Improved source properties and errors; => within case
Date: Sat, 11 Feb 2012 22:08:26 +0100
User-agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.93 (gnu/linux)

Hi Mark,

Mark H Weaver <address@hidden> skribis:

> address@hidden (Ludovic Courtès) writes:
>> However, could it be done in the tree-il/analyze.scm instead, along with
>> other warning passes?
>
> The problem is that 'case' does not exist in tree-il.  By the time
> analyze.scm sees it, 'case' has been transformed into nested 'if's with
> 'memv's.  In theory, similar checks could still be done, but I don't see
> how we could produce warning messages that are easy to understand.

Indeed.

>> The reason I’m asking is that this:
>>
>>> * module/system/base/message.scm (%warning-types): Add 'bad-case-datum'
>>>   and 'duplicate-case-datum' warning types.
>>
>> ... is really meant for compiler warnings (see, for instance, the output
>> of ‘guild compile -Whelp’).  In particular, whether the warnings are
>> emitted is determined by a #:opts sub-option to ‘compile’.
>
> Hmm, good point.  Maybe what we need here is something analogous to
> 'syntax-violation', but for warnings.  One of 'syntax-warning's
> arguments would be the 'warning-type' (a symbol), to allow the warning
> to be disabled.

Sounds good.

> One complication is that, in order to enable ordinary users to easily
> add their own warning types for their macros,

What about addressing this problem separately?  :-)

Thanks,
Ludo’.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]