## preload.pkg
## Author: Matthias Blume (blume@cs.princeton.edu)
# Compiled by:
#
src/app/makelib/makelib.sublib# Parsing and executing a pre-loading spec file
# such as etc/preloads or src/etc/preloads.standard.
# This is used during bootstrap.
package preload
:
api {
Loader
=
String -> Bool;
load
:
Loader # A function which 'make's one .lib file.
->
List( String ) # Libraries to preload -- see
src/app/makelib/mythryl-compiler-compiler/mythryl-compiler-compiler-configuration.pkg ->
Bool; # TRUE iff everyting on load_list build ok.
}
{
Loader
=
String -> Bool;
fun load
make # This is the 'make' entrypoint from
src/app/makelib/main/makelib-g.pkg libraries_to_preload
=
loop libraries_to_preload
where
# 'make' all the libraries in order,
# stopping and returning FALSE if
# one fails to build:
#
fun loop (libfile ! rest)
=>
make libfile ?? loop rest # That library built ok, on to next one.
:: FALSE; # Library didn't build properly, give up.
loop []
=>
TRUE; # Everything built properly, Life is Good.
end;
end;
};
## Copyright (c) 1999 by Lucent Bell Laboratories
## Subsequent changes by Jeff Prothero Copyright (c) 2010-2015,
## released per terms of SMLNJ-COPYRIGHT.