From: Zelphir Kaltstahl <zelphirkaltstahl@posteo.de>
To: Maxime Devos <maximedevos@telenet.be>
Cc: Guile User <guile-user@gnu.org>
Subject: Re: #:printer filed in language specification.
Date: Sun, 19 Sep 2021 12:11:49 +0000 [thread overview]
Message-ID: <b819528c-158c-c2ff-8519-8e2bf1b80737@posteo.de> (raw)
In-Reply-To: <ea4a4eac9d2697b09dde17790e8144e4165046ec.camel@telenet.be>
Hi Maxim!
Do you know of any simple example anywhere for applicable structs? I might have
another use for them.
Regards,
Zelphir
On 9/18/21 4:47 PM, Maxime Devos wrote:
> Justin Veilleux schreef op vr 17-09-2021 om 18:50 [-0400]:
>> It works relatively well. However, I also wanted it to print a human
>> readable version of the procedures created. (It is hard to tell whether
>> #<procedure 1e39a38 (s)> is a correct church encoding of the number 3)
>> With a lot of fiddling, I managed to write a function that turns a
>> procedure into an S-expression.
> The #:printer is only used by things like "guild compile -o ..." I think.
>
> One option is to create ‘applicable structs’ (unfortunately they aren't
> documented), setting the procedure to the actual procedure, and the record
> printer (set-record-type-printer!) to something printing the S-exp of the
> applicable struct.
>
> Greetings,
> Maxime
--
repositories: https://notabug.org/ZelphirKaltstahl
next prev parent reply other threads:[~2021-09-19 12:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-17 22:50 #:printer filed in language specification Justin Veilleux
2021-09-18 14:47 ` Maxime Devos
2021-09-18 15:24 ` Justin Veilleux
2021-09-19 12:11 ` Zelphir Kaltstahl [this message]
2021-09-19 12:24 ` Maxime Devos
2021-09-20 8:04 ` Zelphir Kaltstahl
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b819528c-158c-c2ff-8519-8e2bf1b80737@posteo.de \
--to=zelphirkaltstahl@posteo.de \
--cc=guile-user@gnu.org \
--cc=maximedevos@telenet.be \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).