The (chicken time) time macro gets in my way

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

The (chicken time) time macro gets in my way

Mathieu Desrochers

Hello Schemers,

When I compile the following code :

    (define-record time hour minute)

And compile in version 5 like so :

    csc5 source.scm

I get the following warning :

    assigment to syntax `time'

A clean build would make be happy.
I think the clash is caused by the time
macro from the (chicken time) module.

Any idea how to suppress said warning ?
I would rather not disable warnings
for the whole unit.

Thanks in advance,
Mathieu


_______________________________________________
Chicken-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/chicken-users
Reply | Threaded
Open this post in threaded view
|

Re: The (chicken time) time macro gets in my way

Mario Domenech Goulart-4
Hi Mathieu,

On Sun, 12 May 2019 20:52:47 +0000 Mathieu <[hidden email]> wrote:

> Hello Schemers,
>
> When I compile the following code :
>
> (define-record time hour minute)
>
> And compile in version 5 like so :
>
> csc5 source.scm
>
> I get the following warning :
>
> assigment to syntax `time'
>
> A clean build would make be happy.
> I think the clash is caused by the time
> macro from the (chicken time) module.
>
> Any idea how to suppress said warning ?
> I would rather not disable warnings
> for the whole unit.

Do you actually import chicken.time in your code?  If you don't, you
should not get that warning.

Can you provide a complete minimal test case that can be used to
reproduce the problem?

All the best.
Mario
--
http://parenteses.org/mario

_______________________________________________
Chicken-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/chicken-users
Reply | Threaded
Open this post in threaded view
|

Re: The (chicken time) time macro gets in my way

Mathieu Desrochers
In reply to this post by Mathieu Desrochers

Hi Mario,

Thanks for helping.

Actually the minimal sample is just that :

    source.scm :
    (define-record time a b c)

Then running this produces the warning :

    $ csc5 source.scm
    Warning: (source.scm:1) - assignment to syntax `time'

It looks like csi5 is cool with that statement though.
Could the chicken.time module be included
by default by the compiler?

Using the chicken5-5.0.0 package on FreeBSD.

Thanks again,
Mathieu


_______________________________________________
Chicken-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/chicken-users
Reply | Threaded
Open this post in threaded view
|

Re: The (chicken time) time macro gets in my way

Kristian Lein-Mathisen
In reply to this post by Mario Domenech Goulart-4

Hi Mathieu,

I tried (import (except chicken.time time)) and friends (exclude, rename) without success. I also tried import-syntax. I don't know why it's not possible to hide this default import from the current namespace.

However, by wrapping the file in a main module (using csc -m main time-test.scm), which clearly has different default imports, I'm able to get rid of the warning. I don't know if that's acceptable for you.

K.


On Sun, May 12, 2019, 11:33 PM Mario Domenech Goulart <[hidden email]> wrote:
Hi Mathieu,

On Sun, 12 May 2019 20:52:47 +0000 Mathieu <[hidden email]> wrote:

> Hello Schemers,
>
> When I compile the following code :
>
> (define-record time hour minute)
>
> And compile in version 5 like so :
>
> csc5 source.scm
>
> I get the following warning :
>
> assigment to syntax `time'
>
> A clean build would make be happy.
> I think the clash is caused by the time
> macro from the (chicken time) module.
>
> Any idea how to suppress said warning ?
> I would rather not disable warnings
> for the whole unit.

Do you actually import chicken.time in your code?  If you don't, you
should not get that warning.

Can you provide a complete minimal test case that can be used to
reproduce the problem?

All the best.
Mario
--
http://parenteses.org/mario

_______________________________________________
Chicken-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/chicken-users


_______________________________________________
Chicken-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/chicken-users
Reply | Threaded
Open this post in threaded view
|

Re: The (chicken time) time macro gets in my way

Mathieu Desrochers
In reply to this post by Mathieu Desrochers

Thanks Kristian.

By compiling a file containing only the following statement:

    (time (+ 1 1))

We can confirm that the (chicken time posix) module
is included by default.

I will do with generated warning.

Take care,
Mathieu


_______________________________________________
Chicken-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/chicken-users