[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: #:printer filed in language specification.
From: |
Maxime Devos |
Subject: |
Re: #:printer filed in language specification. |
Date: |
Sat, 18 Sep 2021 16:47:56 +0200 |
User-agent: |
Evolution 3.34.2 |
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
signature.asc
Description: This is a digitally signed message part