diff options
author | Ricardo Wurmus <rekado@elephly.net> | 2016-12-24 08:33:36 +0100 |
---|---|---|
committer | Ricardo Wurmus <rekado@elephly.net> | 2016-12-24 08:33:36 +0100 |
commit | b71a63c28f11328e3bbfd59d2736750c737f98bb (patch) | |
tree | 6e1d807567145191079fe868f937ae156a99dfb6 /com | |
parent | de4f005c76d28b0120c37b3e800ea79c9ff503a1 (diff) |
Add build scripts for CLISP.
Diffstat (limited to 'com')
-rw-r--r-- | com/clisp/savesys.lisp | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/com/clisp/savesys.lisp b/com/clisp/savesys.lisp new file mode 100644 index 0000000..7010b03 --- /dev/null +++ b/com/clisp/savesys.lisp @@ -0,0 +1,40 @@ +(make-package "MUMBLE-IMPLEMENTATION") +(load "cl-support/cl-init") + +;;; Set various internal switches to appropriate values for running +;;; Haskell code. +(proclaim '(optimize (speed 3) (safety 0) (compilation-speed 0))) +(setf *compile-verbose* nil) +(setf *load-verbose* nil) +(in-package :mumble-user) +(setf *printers* '(compiling loading)) +(setf *optimizers* '()) +(setf *compile-interface* '#f) + +;;; Load the prelude. +(compile/load *prelude-unit-filename*) + +;;; Set up the saved system. +(define *saved-readtable* (lisp:copy-readtable lisp:*readtable*)) + +(define (haskell-toplevel) + ;; Saved system always starts up in USER package. + (setf lisp:*package* (lisp:find-package :mumble-user)) + ;; Saved system seems to forget about our readtable hacks. + (setf lisp:*readtable* *saved-readtable*) + ;; Set printer variables w/implementation-defined initial values + ;; to known values + (setf *print-pretty* '#f) + (load-init-files) + (do () ('#f) + (cl:with-simple-restart (restart-haskell "Restart Haskell.") + (heval)))) + +(define (restart-haskell) + (cl:invoke-restart 'restart-haskell)) + +(ext:saveinitmem "bin/clisp-haskell" + :executable t + :quiet t + :init-function 'haskell-toplevel) +(ext:exit) |