guile-devel
[Top][All Lists]
Advanced

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

Re: pushed to master: extensibility to (ice-9 session)


From: Andy Wingo
Subject: Re: pushed to master: extensibility to (ice-9 session)
Date: Wed, 28 Jan 2009 11:29:23 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

Hi,

On Tue 27 Jan 2009 21:30, address@hidden (Ludovic Courtès) writes:

> Looks OK to me. (Too bad [(ice-9 session)] isn't documented BTW.) Do
> you have example use cases?

>From (texinfo reflection):

(cond
 ((defined? 'add-value-help-handler!)
  (define (stexi-help-handler name value)
    (stexi->plain-text (object-stexi-documentation value name #:force #t)))
  (define (module-help-handler name)
    (and (list? name)
         (and-map symbol? name)
         (stexi->plain-text (module-stexi-documentation name))))

  (add-value-help-handler! stexi-help-handler)
  (add-name-help-handler! module-help-handler)))

>> +(define *value-help-handlers* '())
>
> The convention within Guile is rather `%'-prefixed names for globals, as
> in `%load-path'.

I'm going to have to agree with Neil here ;) See also %make-void-port,
%search-load-path, %package-data-dir, etc. Search the manual for
scm_sys_ for more.

> Shouldn't `object-documentation' as a default value helper, as in:
>
>   (define %value-help-handlers
>     `(,(lambda (n v) (object-documentation v))))

Yes, nice one.

Thanks,

Andy
-- 
http://wingolog.org/




reply via email to

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