I'm using GOOPS in Guile Scheme 2.2.3. If I have code like:
(use-modules (oop goops))
(define-class <vec3> ()
(e0 #:init-value 0.0 #:init-keyword #:e0)
(e1 #:init-value 0.0 #:init-keyword #:e1)
(e2 #:init-value 0.0 #:init-keyword #:e2))
(define (make-point x y z)
(make <vec3> #:e0 x #:e1 y #:e2 z))
When I use (make-point)
in the REPL and ask for the value returned it looks something like this:
scheme@(guile-user)> (define p0 (make-point 1 2 3))
scheme@(guile-user)> p0
$1 = #<<vec3> 556b26c087b0>
Is there some way I can override the object printing used by the Guile REPL so I can print the fields of p0
(say) nicely?