Hi,

Yuval Langer <yuval.lan...@gmail.com> writes:

> I have added:
>
>     (cond-expand-provide (current-module) '(srfi-78))
>
> to the top of the `./srfi/srfi-78.scm` file, right after
> `(define-module (srfi srfi-78) ...)`, but I see that within the `guix
> shell -L . guile guile-srfi-78` environment, GNU Guile's `cond-expand`
> only knows that the `srfi-78` feature exists after running
> `use-modules`.
>
> The chicken and the egg.  You can only check if a module exists after
> loading it.
>
> Is there no way of letting GNU Guile's cond-expand know that a package
> was installed with that feature?

Unfortunately no.  However, you can check whether a module is available:

  (if (resolve-module '(srfi srfi-78) #:ensure #f)
      …
      …)

Would that work for you?

Ludo’.

Reply via email to