diff options
author | Yale AI Dept <ai@nebula.cs.yale.edu> | 1993-07-14 13:08:00 -0500 |
---|---|---|
committer | Duncan McGreggor <duncan.mcgreggor@rackspace.com> | 1993-07-14 13:08:00 -0500 |
commit | 4e987026148fe65c323afbc93cd560c07bf06b3f (patch) | |
tree | 26ae54177389edcbe453d25a00c38c2774e8b7d4 /com/akcl/savesys |
Import to github.
Diffstat (limited to 'com/akcl/savesys')
-rwxr-xr-x | com/akcl/savesys | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/com/akcl/savesys b/com/akcl/savesys new file mode 100755 index 0000000..c01db2b --- /dev/null +++ b/com/akcl/savesys @@ -0,0 +1,46 @@ +#!/bin/csh +# +# savesys -- build a saved executable in bin/new-cmu-haskell.core +# +# +cd $Y2 +setenv PRELUDEBIN $Y2/progs/prelude/akcl +if !(-e $PRELUDEBIN/Prelude.o) then + echo "Build the prelude first, stupid..." + exit + endif +$AKCL <<EOF +;;; Load the Haskell system. +(make-package "MUMBLE-IMPLEMENTATION" :use '("LISP")) +(load "cl-support/cl-init.lisp") +;;; Set various internal switches to appropriate values for running +;;; Haskell code. +(proclaim '(optimize (speed 3) (safety 0) (compilation-speed 0))) +(setf *load-verbose* nil) +(setf compiler:*compile-verbose* nil) +(in-package :mumble-user) +(setf *printers* '(compiling loading)) +(setf *optimizers* '()) +(setf *compile-interface* '#f) +(setf *code-chunk-size* 100) +;;; Load the prelude. +(compile/load *prelude-unit-filename*) +;;; Set up the saved system. +;;; AKCL doesn't have the new CL condition system, so define the +;;; restart function using catch and throw. +(define (haskell-toplevel) + (setf lisp:*package* (lisp:find-package :mumble-user)) + (setf lisp:*default-pathname-defaults* (lisp:truename "./")) + (load-init-files) + (do () ('#f) + (lisp:catch 'restart-haskell + (heval)))) +(define (restart-haskell) + (lisp:throw 'restart-haskell '#f)) +;;; Have to do garbage collection and set-up of top-level function +;;; by hand before calling save. +;;; AKCL exits automatically after calling save. +(lisp:gbc 3) +(setf system::*top-level-hook* (function haskell-toplevel)) +(lisp:save "bin/new-akcl-haskell") +EOF |