chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] record-type-name in SRFI-9


From: felix winkelmann
Subject: Re: [Chicken-users] record-type-name in SRFI-9
Date: Mon, 3 Mar 2008 13:10:54 +0100

On Mon, Mar 3, 2008 at 6:53 AM, Peter Danenberg <address@hidden> wrote:
> I'm trying to dispatch on SRFI-9 record types; and I notice that
>  although SRFI-9 provides record-type-name, chicken doesn't export it.

Does SRFI-9 specify it? I can't find any reference.

>
>  Short of abusing cond, it seems like my only option is the
>  non-standard define-record-printer combined with an
>  with-output-to-string hack; do you concur?

Non-standard in any case, but you can get the type name
(a symbol) like this:

(define (get-record-type-name rcrd) (##sys#slot rcrd 0))


cheers,
felix




reply via email to

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