From fb6cf6e95d89ac1197bea00ea139efb923712c25 Mon Sep 17 00:00:00 2001 From: Peter Bex Date: Sun, 30 Jun 2019 19:22:55 +0200 Subject: [PATCH] Explain how define-record-printer is not a definition This should "fix" #1294. --- manual/Module (chicken base) | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/manual/Module (chicken base) b/manual/Module (chicken base) index 3a8fab1e..462591bb 100644 --- a/manual/Module (chicken base) +++ b/manual/Module (chicken base) @@ -1199,6 +1199,13 @@ type is written using {{display, write}} or {{print}}, then the procedure is called with two arguments: the record to be printed and an output-port. +Note that, unlike the name implies, this is not a true definition of +an identifier (like {{{define}}}). This means if you have local +defines in a procedure, and use {{{define-record-printer}}} inside it, +that will break up the internal {{{letrec}}} sequence of definitions, +so earlier definitions cannot see later ones after the +{{{define-record-printer}}}. + (define-record-type foo (make-foo x y z) foo? (x foo-x) -- 2.11.0