last arg of fn body should be displayed

This commit is contained in:
Alex Shinn 2018-01-07 15:05:29 +09:00
parent a328b3fb4a
commit fd3e1f10d3

View file

@ -11,7 +11,7 @@
(define-environment-monad Show-Env (define-environment-monad Show-Env
(sequence: sequence) (sequence: sequence)
(bind: fn) (bind: %fn)
(bind-fork: fn-fork) (bind-fork: fn-fork)
(local: %with) (local: %with)
(local!: update!) (local!: update!)
@ -32,6 +32,11 @@
(writer env-writer env-writer-set!) (writer env-writer env-writer-set!)
(output env-output env-output-set!))) (output env-output env-output-set!)))
(define-syntax fn
(syntax-rules ()
((fn vars expr ... fmt)
(%fn vars expr ... (displayed fmt)))))
;; The base formatting handles outputting raw strings and a simple, ;; The base formatting handles outputting raw strings and a simple,
;; configurable handler for formatting objects. ;; configurable handler for formatting objects.