%% Copyright (c) 1995,1996 by the University of Pennsylvania %% %% For information about the distributaion, copying, and modification %% %% of this software, please read the file COPYING located in the root %% %% directory of this distribnutaion. If you did not receive the file %% %% COPYING write to Philip Wickline at the address below. %% %% This program is distributed in the hope that it will be useful but %% %% WITHOUT ANY WARRANTY; without even the implied warranty of %% %% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the file %% %% COPYING for more details. %% %% For information about the structure of the Terzo lambdaProlog %% %% implementation, see the file src/README in this distribution. Please %% %% address any questions about this code or the Terzo lambdaProlog %% %% implementation to Philip Wickline at . %% %% Author: %% %% Philip Wickline %% module Int. import Exception. % Exceptions which can be handled by handle type divide_by_zero, overflow exn. % binary functions on integers - % x div y - the quotiant of x and y, rounded down % x quot y - the quotiant of x and y, rounded towards zero type +, -, *, div, mod, quot, rem, min, max int -> int -> int. infixl +, - 6. infixl *, div, mod, quot, rem 7. % ~ is simple unary negation, abs yields the absolute value of % its argument type ~, abs int -> int. % make an ascii representation of its argument type int_to_string int -> string. % binary predicates on integers type <, >, >=, =< int -> int -> o. infix <, >, >=, =< 4.