[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ttn-pers-scheme 0.19 available
From: |
Marius Vollmer |
Subject: |
Re: ttn-pers-scheme 0.19 available |
Date: |
19 May 2001 13:37:09 +0200 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.0.102 |
thi <address@hidden> writes:
> - (ice-9 rdelim) required for `read-line' and friends, but
> `use-modules' no longer can be conditionalized, so the old
> `(or (defined? 'read-line) (use-modules (ice-9 rdelim)))'
> workaround no longer works.
`use-modules' *can* be conditionalized. The trick is to observe that
use-modules can only be used at top-level, but that the arms of an
`if' or the clauses in a `cond' are still on top-level when the
outermost form is. The arguments of a `or' are on top-level in Guile,
but you shouldn't count on this.
So, this oughta work
(if (not (defined? 'read-line))
(use-modules (ice-9 rdelim)))
Of course, you would give the hypothetical compiler a hard time with
this.
It is probably better to move conditional module system operations to
macro-expansion time. Could `cond-expand' be extended to allow for
more general tests?