[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] How to use prelude?
From: |
Peter Bex |
Subject: |
Re: [Chicken-users] How to use prelude? |
Date: |
Sun, 28 May 2006 12:50:31 +0200 |
User-agent: |
Mutt/1.4.2.1i |
On Sun, May 28, 2006 at 12:31:14PM +0200, felix winkelmann wrote:
> > Adding a quote in front of the define doesn't work either as that expands
> > to (quote (define with-x #t))
>
> Try "'...'" (one pair of double-quotes for scheme, and one pair of single
> quotes for the shell).
It would be nice if you could document this in the manual.
> > How does this work, then? (also, can I use cond-expand with this? I'm not
> > sure how to add features cond-expand can check against)
>
> As Kon replied: register-feature! is the way. But that is at run-time,
> of course.
> To have it available at compile-time (I'm not 100% sure in what way you
> want to use this), things are (as usual) a tiny little bit more complicated.
Could you elaborate on how to do it? I though cond-expand was compile-time.
I guess I was wrong :)
Anyway, what I want to do: I have a definition for a C function that only
exists if Imlib2 is compiled without X. So, if X is not found, I don't want
a binding for that function. I guess this has to be done compile time, since
the function doesn't even exist, meaning the (foreign-lambda ...) can't be
translated.
I hope I am making some sense here.
Regards,
Peter
--
http://sjamaan.ath.cx
--
"The process of preparing programs for a digital computer
is especially attractive, not only because it can be economically
and scientifically rewarding, but also because it can be an aesthetic
experience much like composing poetry or music."
-- Donald Knuth
pgpUMAAgdkJiC.pgp
Description: PGP signature