Module: dylan-user Synopsis: Common Dylan library definition Author: Andy Armstrong Version: $HostName$ Copyright: Original Code is Copyright (c) 1995-2004 Functional Objects, Inc. All rights reserved. License: Functional Objects Library Public License Version 1.0 Dual-license: GNU Lesser General Public License Warranty: Distributed WITHOUT WARRANTY OF ANY KIND define library common-dylan use dylan, export: { dylan, finalization, threads, threads-extensions }; use unix-portability; export common-dylan, common-extensions, streams-protocol, locators-protocol, machine-words, simple-random, simple-profiling, simple-io, byte-vector, transcendentals, functional-objects-extras; end library common-dylan; define module simple-profiling create \profiling, , start-profiling-type, stop-profiling-type, profiling-type-result; end module simple-profiling; define module byte-vector use dylan-extensions, export: { }; create , byte-vector-fill, byte-vector-ref, byte-vector-ref-setter, copy-bytes; end module byte-vector; define module common-extensions use dylan-extensions, export: { , , , , , , , , , , , , false-or, ignorable, ignore, \iterate, one-of, remove-all-keys!, rest, subclass, \when, register-application-exit-function }; use simple-debugging, export: { \assert, \debug-assert, debug-message }; use simple-debugging, export: { \assert, \debug-assert, debug-message }; use simple-profiling, export: { \profiling, profiling-type-result }; use byte-vector, export: { }; create , , close, $unsupplied, unsupplied, unsupplied?, supplied?, $unfound, unfound, unfound?, found?, true?, false?, concatenate!, condition-to-string, difference, position, split, fill-table!, find-element, find-value, format-to-string, float-to-string, integer-to-string, number-to-string, string-to-integer, machine-word-to-string, string-to-machine-word, \table-definer, application-name, application-filename, application-arguments, tokenize-command-line, exit-application; end module common-extensions; define module common-dylan use dylan, export: all; use common-extensions, export: all; end module common-dylan; define module simple-io create format-out; end module simple-io; define module simple-random create , random; end module simple-random; define module locators-protocol create ; create supports-open-locator?, open-locator, supports-list-locator?, list-locator; end module locators-protocol; define module streams-protocol use common-extensions, import: { , close }, export: all; // Conditions create , stream-error-stream, , , stream-error-sequence, stream-error-count, , stream-error-count; // Opening streams create open-file-stream; // Reading from streams create read-element, unread-element, peek, read, read-into!, discard-input, stream-input-available?, stream-contents, stream-contents-as; // Writing to streams create write-element, write, force-output, wait-for-io-completion, synchronize-output, discard-output; // Querying streams create stream-open?, stream-element-type, stream-at-end?, stream-size; // Positioning streams create , stream-position, stream-position-setter, adjust-stream-position; end module streams-protocol; define module transcendentals use dylan; use dylan-primitives; create $single-pi, $double-pi, // $extended-pi, $single-e, $double-e, // $extended-e, sqrt, isqrt, log, exp, logn, sin, cos, tan, asin, acos, atan, atan2, sinh, cosh, tanh, asinh, acosh, atanh; end module transcendentals; define module transcendentals use dylan; use dylan-primitives; export $single-pi, $double-pi, // $extended-pi, $single-e, $double-e, // $extended-e, sqrt, isqrt, log, exp, logn, sin, cos, tan, asin, acos, atan, atan2, sinh, cosh, tanh, asinh, acosh, atanh; end module transcendentals; define module machine-words use dylan-extensions, export: {, $machine-word-size, $maximum-signed-machine-word, $minimum-signed-machine-word, $maximum-unsigned-machine-word, $minimum-unsigned-machine-word, as-unsigned }; create %logior, %logxor, %logand, %lognot, %logbit?, %count-low-zeros, %count-high-zeros, \%+, \%-, \%*, %floor/, %ceiling/, %round/, %truncate/, %divide, %negative, %abs, %shift-left, %shift-right; create so%+, so%-, so%*, so%negative, so%abs, so%shift-left; create d%floor/, d%ceiling/, d%round/, d%truncate/, d%divide; create u%+, u%-, u%*, u%divide, u%rotate-left, u%rotate-right, u%shift-left, u%shift-right, u%<; create ud%divide, ud%shift-left, ud%shift-right; end module machine-words; define module functional-objects-extras use common-extensions, import: { }, export: all; create default-last-handler, , , , write-console; end module functional-objects-extras; define module common-dylan-internals use common-dylan; use functional-objects-extras; use dylan-extensions; use dylan-direct-c-ffi; use machine-word-lowlevel; use machine-words; use threads; use transcendentals; use byte-vector; use streams-protocol; use locators-protocol; use simple-random; use simple-profiling; use simple-io; use unix-portability; end module common-dylan-internals;