## posix-environment.api
#
# A UNIX environment is a list of strings of the form "name=value", where
# the "=" character does not appear in name.
#
# NOTE: Saving the user's environment in a Mythryl variable and then saving the
# heap image to disk and later reloading it can result in incorrect behavior,
# since the environment bound in the heap image may differ from the user's
# environment when the exported image is used.
# Compiled by:
#
src/lib/posix/posix.lib# This api is implemented in:
#
src/lib/posix/posix-environment.pkgapi Posix_Environment {
get_from_env: (String, List(String)) -> Null_Or( String );
#
# Return the value, if any, bound to the name.
get_value: { name: String, default: String, env: List( String ) } -> String;
#
# Return the value bound to the name, or a default value.
remove_from_env: (String, List(String)) -> List(String);
#
# Remove a name-value pair from an environment.
add_to_env: (String, List(String)) -> List( String );
#
# Add a name-value pair to an environment,
# replacing any pre-existing pair which conflicts.
environ: Void -> List(String);
#
# Return the user's environment.
get_env: String -> Null_Or( String );
# Return the value of an environment variable
# in the user's environment.
};
## COPYRIGHT (c) 1993 by AT&T Bell Laboratories. See SMLNJ-COPYRIGHT file for details.
## Subsequent changes by Jeff Prothero Copyright (c) 2010-2015,
## released per terms of SMLNJ-COPYRIGHT.