Skip to content

Avoid inserting NIL into simple LOOP from FORMAT

Tarn Burton requested to merge yitzchak/cmucl:fix-format-nil into master

Simple LOOP requires only compound forms. Hence NIL is not permitted. Some FORMAT directives (like newline) return NIL as the form when they have nothing to add to the body. Normally this is fine since BLOCK accepts NIL as a form. On the other hand, when the newline directive is inside of an iteration directive this will produce something like

(LOOP (fu) nil (bar))

This is probably mostly a spec compliance issue. It does not show up as a bug since ABCL's Loop implementation isn't strict in this sense. Loading an alternate LOOP implementation which is more strict like Khazern will cause FORMAT to fail.

PRs have already been submitted and merged for some of the other CMUCL-based FORMAT implementations like Clasp and ECL.

Merge request reports