pprint-coalton-codegen-types pretty-prints the typed Common Lisp code generated by coalton-codegen-types to *standard-output*.

Syntax

(pprint-coalton-codegen-types
  ⟨toplevel-form⟩*)

Semantics

  • pprint-coalton-codegen-types accepts the same top-level forms as coalton-toplevel.
  • It compiles the forms via coalton-codegen-types (with coalton-impl/settings:*emit-type-annotations* bound to t) and pretty-prints the resulting Common Lisp (progn ...) form to *standard-output*.
  • Like pprint-coalton-codegen, it prints inside a temporary package that imports all symbols accessible in *package* so symbol names are easy to read.
  • Returns zero values (cl:values).

Examples

(pprint-coalton-codegen-types
  (declare hypot-sq (F64 * F64 -> F64))
  (define (hypot-sq x y)
    (+ (* x x) (* y y))))

Other notes

  • pprint-coalton-codegen-types is the primary tool for verifying that unboxed numeric types, dynamic-extent declarations, and unsafe type-check elisions are emitted as expected for the host Lisp compiler.
  • See pprint-coalton-codegen and coalton-codegen-types.