restore type inference layer 0

The type IR, unification with the unknown type, constraints and
schemes, built and tested on its own. Nothing calls it yet.
This commit is contained in:
2026-09-29 23:48:32 +03:00
parent cd3016b6b8
commit 6f54bfbe08
9 changed files with 1065 additions and 7 deletions

View File

@@ -138,6 +138,17 @@ wrap a form-building expression."
"Signal an error about FORM, prefixed with where it was written."
(apply error (string-append (form-location form) message) args))
(define (sex-warning form message . args)
"Report something about FORM that does not stop the compilation.
Goes to stderr, prefixed with where the form was written, so a warning
reads like an error and sorts alongside one in a build log."
(let ((port (current-error-port)))
(display (form-location form) port)
(display "warning: " port)
(display message port)
(for-each (lambda (arg) (display " " port) (display arg port)) args)
(newline port)))
(define (stamp-form-source! form src)
"Give FORM and every subform that has none the location SRC. Used for
macro expansions, which inherit the location of the call site the way a