Re: [Chicken-hackers] [PATCH] Print more information about why an identifier cannot be exported
Evan Hanson writes: > On 2019-10-19 10:23, megane wrote: >> 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. > > Good point, thanks for the better suggestions. > >> - 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. > > Yeah, I've gone with this one. "Because it refers to a foo" is probably > more correct, but I don't think the extra pedantry will help people fix > their programs, which is the whole point of these messages... > > Anyway, pushed, thank you megane! Thanks for making the changes. It's better now. > > Evan > > ___ > Chicken-hackers mailing list > Chicken-hackers@nongnu.org > https://lists.nongnu.org/mailman/listinfo/chicken-hackers ___ Chicken-hackers mailing list Chicken-hackers@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-hackers
Re: [Chicken-hackers] [PATCH] Print more information about why an identifier cannot be exported
On 2019-10-19 10:23, megane wrote: > 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. Good point, thanks for the better suggestions. > - 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. Yeah, I've gone with this one. "Because it refers to a foo" is probably more correct, but I don't think the extra pedantry will help people fix their programs, which is the whole point of these messages... Anyway, pushed, thank you megane! Evan ___ Chicken-hackers mailing list Chicken-hackers@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-hackers
Re: [Chicken-hackers] [PATCH] Print more information about why an identifier cannot be exported
megane writes: > Evan Hanson 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 >> Chicken-hackers@nongnu.org >> https://lists.nongnu.org/mailman/listinfo/chicken-hackers ___ Chicken-hackers mailing list Chicken-hackers@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-hackers
Re: [Chicken-hackers] [PATCH] Print more information about why an identifier cannot be exported
Evan Hanson 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 :) > > Evan > > ___ > Chicken-hackers mailing list > Chicken-hackers@nongnu.org > https://lists.nongnu.org/mailman/listinfo/chicken-hackers ___ Chicken-hackers mailing list Chicken-hackers@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-hackers
Re: [Chicken-hackers] [PATCH] Print more information about why an identifier cannot be exported
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. Evan ___ Chicken-hackers mailing list Chicken-hackers@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-hackers