That's not how I would "fix" this, if I were to. The transform's constraint should be (constant-arg (satisfies proper-list-p)) and proper-list-p should be made foldable.
However, to me this is a won't-fix and I feel pretty strongly about that.
It is no different from https://bugs.launchpad.net/sbcl/+bug/1887323
which says "It is not to be used on random stuff"
Also there's no end to the list of things that can crash when you hand the compiler a form that explicitly mentions system internals
* (compile nil '(Lambda (x) (%primitive nope)))
debugger invoked on a BUG in thread
#<THREAD "main thread" RUNNING {10015A8143}>:
undefined primitive NOPE
This is probably a bug in SBCL itself ...
That's not how I would "fix" this, if I were to. The transform's constraint should be (constant-arg (satisfies proper-list-p)) and proper-list-p should be made foldable.
However, to me this is a won't-fix and I feel pretty strongly about that. /bugs.launchpad .net/sbcl/ +bug/1887323
It is no different from https:/
which says "It is not to be used on random stuff"
Also there's no end to the list of things that can crash when you hand the compiler a form that explicitly mentions system internals
* (compile nil '(Lambda (x) (%primitive nope)))
debugger invoked on a BUG in thread
#<THREAD "main thread" RUNNING {10015A8143}>:
undefined primitive NOPE
This is probably a bug in SBCL itself ...