chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] SRFI-57 does not seem to respect type


From: felix winkelmann
Subject: Re: [Chicken-users] SRFI-57 does not seem to respect type
Date: Mon, 18 Apr 2005 07:24:52 +0200

On 4/15/05, Dale Jordan <address@hidden> wrote:
> 
> For anyone interested, I have attached a version of "match" that works
> with the srfi-57 egg.  I just append it to srfi-57.scm and reinstall the
> extension.  In addition to (import records), (import matcher).

Very nice. May I package this as an egg?

> 
> Yes, this is because the types are implemented as chicken structures
> with a type of record.  I don't know what the ramifications of changing
>      this are.  I made a small hack changing
>     (define generated-tag (cons #f #f))
> to
>     (define generated-tag (list 'name))
> 
> This lets the type show up in the ",d" command in csi.  The
> generated-tag has to be bound to a new list cell to preserve
> "generativity".  Generativity prevents inadvertant name clashes from
> being confused as the same type and prevents forgery, but it means while
> debugging if you change the record definition, any existing records are
> no longer accessible.  :(

I'll change the srfi-57 egg accordingly.

> 
> BTW, felix, the csi help message is wrong about ",<NUM>" invoking the
> history mechanism -- it seems "#<NUM>" is the correct syntax.
> 

Oops. Thanks.


cheers,
felix




reply via email to

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