guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: #:printer filed in language specification.


From: Justin Veilleux
Subject: Re: #:printer filed in language specification.
Date: Sat, 18 Sep 2021 11:24:38 -0400
User-agent: K-9 Mail for Android

Thanks a lot.

On September 18, 2021 10:47:56 a.m. EDT, Maxime Devos <maximedevos@telenet.be> 
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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]