-(defun extract-function-type (fun)
- (cond #!+sb-interpreter
- ((sb!eval:interpreted-function-p fun)
- (sb!eval:interpreted-function-type fun))
- (t
- (typecase fun
- (byte-function (byte-function-type fun))
- (byte-closure (byte-function-type (byte-closure-function fun)))
- (t
- (specifier-type (%function-type (%closure-function fun))))))))