chicken-hackers
[Top][All Lists]
Advanced

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

Re: [Chicken-hackers] [PATCH] check for exported types, constants, inlin


From: Peter Bex
Subject: Re: [Chicken-hackers] [PATCH] check for exported types, constants, inline procedures (#1346)
Date: Sat, 5 Oct 2019 16:49:00 +0200
User-agent: Mutt/1.10.1 (2018-07-13)

On Thu, Oct 03, 2019 at 01:11:31PM +0200, address@hidden wrote:
> This patch extends 21ff0d6affb35f7184a5e78f9d4beccc869b47b2 to
> type-names, inline procedures and constants, giving a warning when
> an identifier naming such an entity is exported.

I think the types should be excluded from this check because those are
in a completely different namespace:

(module foo (x)
  (import scheme (chicken base) (chicken type))
  (define x 2)
  (define-type x float)
  (print x))

(import foo)
(print x)

The program above works fine before this patch but not with it.
If you put define-constant or define-inline at the place of the
define-type, the program will also work but the output of the
print calls will be inconsistent.  Only with types the result
is consistent, and I think it isn't wrong to allow this, given
that types aren't first-class Scheme objects.

So, I'd suggest the attached patch instead.  I've also updated NEWS
to mention the other types we check and remove the comment that the
fix is partial.

Cheers,
Peter

Attachment: 0001-Extend-export-identifier-check.patch
Description: Text Data

Attachment: signature.asc
Description: PGP signature


reply via email to

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