[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: The Common Lisp Condition System for KCL

There is an improved version of clcs for KCL available today.
It is in the file  pub/lisp/clcs.tar.Z (available for anonymous 
ftp from turing.cs.rpi.edu).

- No KCL symbols are redefined until (conditions::install-clcs-symbols)
  is run.  This function is run just before (load-clcs) and (compile-clcs)
  finish.  The function (conditions::revert-clcs-symbols) is the inverse
  of (conditions::install-clcs-symbols).
- si:top-level is not redefined by (conditions::install-clcs-symbols),
  because conditions::compute-restarts and conditions::find-restart
  have been changed to include restart(s) corresponding to the catch(s)
  established by si:top-level.
- The installation sequence is now:
   To install clcs,
     cd to the directory which is to contain the clcs directory,
     type: zcat clcs.tar.Z | tar xf -
     type: cd clcs
     edit the value of *clcs-root-directory* in sysdef.lsp,
     then run lisp and do:
      (compile-file "sysdef") ; optional
      (load "sysdef")
     and then run lisp again do:
      (load "sysdef") 
  (Note that there is no longer any need to run si:top-level or save)
- The function conditions::install-clcs-symbols installs new 
  definitions for compile-file and compile which add restart loops 
  so that the user gets a chance to retry the operation if it fails.
  The new functions just call their original definitions to do most 
  of the work.
- If you want an exercise in using the CLCS, look at the function
  conditions::new-error-set (at the end of the file kcl-cond.lisp),
  which is the new definition for si:error-set.

Still to do:
  The mapping from error-name,error-format-string (the first and 
fifth arguments to si:universal-error-handler) to condition classes
that is defined in the file kcl-cond.lisp is incomplete.  The error
calls made by the kcl files c/error.c, c/eval.c, and c/file.d are
mapped correctly, but other all other calls are mapped to a
condition (conditions::internal-simple-error) that is (often) less 
specific than the correct condition.  

  Richard Harris