Fix minor compilation problems in extras and benchmarks.

These are due to:

- differences between module and file names.
- redundant imports
- the recent change from math.domain_error -> exception.domain_error.

benchmarks/*/*.m:
extras/*/*.m:
    As above.
This commit is contained in:
Julien Fischer
2020-05-15 16:00:41 +10:00
parent f36c88bbd0
commit 84e2536618
11 changed files with 13 additions and 18 deletions

View File

@@ -1,5 +1,5 @@
:- module fib_plain_par.
:- module fib_par_plain.
:- interface.

View File

@@ -19,7 +19,7 @@
:- implementation.
:- import_module int, list, exception, map, string, gml.
:- import_module int, list, exception, map, string.
:- import_module pprint.
write_nice_exception(E) -->

View File

@@ -31,7 +31,7 @@
:- import_module transform_object, gml, op.
:- import_module precompute_lights.
:- import_module map, array, exception, require, math.
:- import_module int, float, list, std_util, string.
:- import_module int, float, std_util, string.
render(Params1) -->
{ Wid = Params1 ^ wid },

View File

@@ -198,7 +198,7 @@
:- implementation.
:- import_module exception, string, math, list, std_util.
:- import_module exception, string, math, std_util.
% NOTE 1: points and vectors are represented using the point/3 type
% defined in eval.m. For the purposes, a point (x, y, z) is

View File

@@ -76,7 +76,7 @@
:- implementation.
:- import_module int, list, char, exception, string, bool.
:- import_module int, exception, string, bool.
:- import_module maybe.
:- import_module pair.

View File

@@ -86,7 +86,7 @@
:- implementation.
:- import_module require, string.
:- import_module require.
colour(R1, G1, B1) + colour(R2, G2, B2) = colour(R1 + R2, G1 + G2, B1 + B2).

View File

@@ -45,7 +45,6 @@
:- import_module exception.
:- import_module float.
:- import_module int.
:- import_module list.
:- import_module map.
:- import_module require.
:- import_module std_util.

View File

@@ -200,7 +200,7 @@
:- func invmod(gmp_int, gmp_int) = gmp_int.
% Exponentiation.
% Throws exception `math.domain_error` if Y is negative.
% Throws exception `exception.domain_error` if Y is negative.
%
:- func pow(gmp_int, gmp_int) = gmp_int.
@@ -296,7 +296,6 @@
:- import_module exception.
:- import_module int.
:- import_module math.
:- import_module require.
%---------------------------------------------------------------------------%
@@ -523,7 +522,7 @@ det_to_int(A) = Res :-
( to_int(A, Res0) ->
Res0 = Res
;
throw(math.domain_error("gmp_int.det_to_int: not in int range"))
throw(domain_error("gmp_int.det_to_int: not in int range"))
).
:- pred fits_in_long(gmp_int::in) is semidet.
@@ -556,7 +555,7 @@ to_base_string(A, R) = S :-
( ( R >= 2, R =< 62 ) ->
S = gmp_to_base_string(A, R)
;
throw(math.domain_error("gmp_int.to_base_string: base must be between 2 and 62"))
throw(domain_error("gmp_int.to_base_string: base must be between 2 and 62"))
).
:- func gmp_to_base_string(gmp_int, int) = string.
@@ -785,7 +784,7 @@ det_sqrt(A) = Res :-
( sqrt(A, Root) ->
Res = Root
;
throw(math.domain_error("gmp_int.det_sqrt: number must be non-negative"))
throw(domain_error("gmp_int.det_sqrt: number must be non-negative"))
).
:- pred gmp_sqrt(gmp_int::in, gmp_int::out) is det.
@@ -809,7 +808,7 @@ det_nthroot(A, N) = Res :-
( nthroot(A, N, Root) ->
Res = Root
;
throw(math.domain_error("gmp_int.det_sqrt: number must be non-negative"))
throw(domain_error("gmp_int.det_sqrt: number must be non-negative"))
).
:- pred gmp_nthroot(gmp_int::in, int::in, gmp_int::out) is det.
@@ -835,7 +834,7 @@ legendre(A, B, Res) :-
pow(A, N) = Res :-
( is_negative(N) ->
throw(math.domain_error("gmp_int.pow: cannot handle negative exponent"))
throw(domain_error("gmp_int.pow: cannot handle negative exponent"))
;
Res = pow2(A, N)
).

View File

@@ -386,7 +386,6 @@
:- import_module exception.
:- import_module float.
:- import_module int.
:- import_module list.
:- import_module math.
:- import_module store.
:- import_module string.

View File

@@ -27,7 +27,6 @@
:- import_module char.
:- import_module io.
:- import_module list.
:- import_module maybe.
:- import_module pair.
:- import_module string.
:- import_module sparse_bitset.
@@ -270,11 +269,11 @@
:- import_module array.
:- import_module bool.
:- import_module char.
:- import_module exception.
:- import_module require.
:- import_module int.
:- import_module map.
:- import_module maybe.
:- import_module lex.automata.
:- import_module lex.buf.

View File

@@ -191,7 +191,6 @@
:- implementation.
:- import_module bool.
:- import_module int.
:- import_module require.
:- import_module net.errno.