chicken-hackers
[Top][All Lists]
Advanced

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

Re: [Chicken-hackers] [PATCH] Print more information about why an identi


From: megane
Subject: Re: [Chicken-hackers] [PATCH] Print more information about why an identifier cannot be exported
Date: Sat, 19 Oct 2019 16:58:57 +0300
User-agent: mu4e 1.0; emacs 25.1.1

megane <address@hidden> writes:

> Evan Hanson <address@hidden> writes:
>
>> Hi megane,
>>
>> That's a nice improvement, good idea.
>>
>> What do you think of these wordings for the warning messages? I think
>> they read a bit more clearly.
>>
>>     Warning: In module `mod', type abbreviation `a-type-alias' cannot be 
>> exported.
>>
>>     Warning: In module `mod', inlined function `an-inline' cannot be 
>> exported.
>>
>>     Warning: In module `mod', constant `a-constant' cannot be exported.
>>
>>     Warning: In module `mod', foreign variable `a-foreign' cannot be 
>> exported.
>>
>>     Warning: In module `mod', exported identifier `a-undefined' has not been 
>> defined.
>>
>> Would you be OK with that change? If so I can apply it.
>
> "Warning: In module `mod', type abbreviation `a-type-alias' cannot be
> exported."
>
> This doesn't say why the abbreviation cannot be exported. As a beginner
> I'm left wondering that maybe there's some strange reason, but the
> compiler is not telling it to me.
>
> The reason of course is that type abbreviations cannot be exported.
>
> If you find some cleaner way to give that information then go ahead :)

Here are some alternatives:

- Warning: Cannot export `a-type-alias' because it is a type
  abbreviation.

I'd vote for this, because of its shortness. The warning is actually
fatal, and the compilation will stop shortly with a message that
includes the module name.

- Warning: In module `mod', type abbreviation `a-type-alias' cannot be
  exported.

This is your suggestion.

- Warning: Cannot export `a-type-alias' because it refers to a type
  abbreviation.

- Warning: Cannot export `a-type-alias' from module `mod', it refers to
  a type abbreviation.

This is my original suggestion.

- Warning: In module `mod', `a-type-alias' is unexportable because it is
  a type abbreviation.

- Warning: Cannot export `a-type-alias' from module `mod', because it
  refers to a type abbreviation.

- Warning: In module `mod', identifier `a-type-alias' cannot be
  exported, because it refers to a type abbreviation.

>
>>
>> Evan
>>
>> _______________________________________________
>> Chicken-hackers mailing list
>> address@hidden
>> https://lists.nongnu.org/mailman/listinfo/chicken-hackers



reply via email to

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