-(defun make-fun-type (&rest initargs
- &key (args nil argsp) returns &allow-other-keys)
- (if argsp
- (if (eq args '*)
- (if (eq returns *wild-type*)
- (specifier-type 'function)
- (%make-fun-type :wild-args t :returns returns))
- (multiple-value-bind (required optional rest keyp keywords allowp)
- (args-types args)
- (if (and (null required)
- (null optional)
- (eq rest *universal-type*)
- (not keyp))
- (if (eq returns *wild-type*)
- (specifier-type 'function)
- (%make-fun-type :wild-args t :returns returns))
- (%make-fun-type :required required
- :optional optional
- :rest rest
- :keyp keyp
- :keywords keywords
- :allowp allowp
- :returns returns))))
- ;; FIXME: are we really sure that we won't make something that
- ;; looks like a completely wild function here?
- (apply #'%make-fun-type initargs)))