The source project of this merge request has been removed.
cmp: Fix the broken "too few arguments" error messages for mapcar and friends
This fixes #188 (closed).
The C-compiler "too few arguments" error messages for mapcar
and friends were really broken: #'program-error
was used instead of 'program-error
, firt
was used instead of first
and the format arguments weren't in a list.
Before we would get this obscure error message:
> (defun oops () (mapcar #'1+))
OOPS
> (compile 'oops)
;;; OPTIMIZE levels: Safety=2, Space=0, Speed=3, Debug=0
;;;
;;; Error:
;;; * The macro form (MAPCAR #'1+) was not expanded successfully.
;;; Error detected:
;;; The function PROGRAM-ERROR is undefined.
Now we get
> (compile 'oops)
;;; OPTIMIZE levels: Safety=2, Space=0, Speed=3, Debug=0
;;;
;;; Error:
;;; * Too few arguments to function MAPCAR in form: (MAPCAR #'1+)
Also now cmperr
is used instead of si::signal-simple-error
. This is consistent with other error messages like
> (defun whoops () ((lambda (x))))
WHOOPS
> (compile 'whoops)
;;; OPTIMIZE levels: Safety=2, Space=0, Speed=3, Debug=0
;;;
;;; Error:
;;; * Too few arguments for lambda form (LAMBDA (X))