On Mon, Jun 05, 2017 at 06:09:54PM +1200, Evan Hanson wrote: > Is that right? Personally, I'd rather make (declare (hide ...)) simply > do the right thing -- the right thing being the behaviour you originally > expected when filing #1376 -- than add a new type of declaration or > module syntax. > > I think this is similar to what Peter has said on that ticket, so a > patch of that sort would be very welcome.
This is slightly more complicated due to declare being module-unaware. (declare (hide foo)) (module a * (import chicken scheme) (define foo 1)) (module b * (import chicken scheme) (define foo 2)) Which foo should be hidden? Both, or none? I think the sane thing to do here is to make it error out, considering there's no top-level foo to hide, and make it work like this: (module a * (import chicken scheme) (define foo 1)) (module b * (declare (hide foo)) (import chicken scheme) (define foo 2)) So here a#foo is visible and exported, while b#foo is hidden and not exported. Cheers, Peter
signature.asc
Description: Digital signature
_______________________________________________ Chicken-hackers mailing list Chicken-hackers@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-hackers