[m-dev.] diff: remove support for cuts
Zoltan Somogyi
zs at cs.mu.OZ.AU
Tue Mar 28 13:04:23 AEST 2000
Estimated hours taken: 0.5
Remove support for cuts in Mercury code.
library/builtin.m:
Remove the ! predicate.
library/*.m:
compiler/*.m:
Remove calls to !.
Zoltan.
cvs diff: Diffing .
cvs diff: Diffing bindist
cvs diff: Diffing boehm_gc
cvs diff: Diffing boehm_gc/Mac_files
cvs diff: Diffing boehm_gc/cord
cvs diff: Diffing boehm_gc/cord/private
cvs diff: Diffing boehm_gc/include
cvs diff: Diffing boehm_gc/include/private
cvs diff: Diffing browser
cvs diff: Diffing bytecode
cvs diff: Diffing compiler
Index: compiler/code_gen.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/code_gen.m,v
retrieving revision 1.75
diff -u -b -r1.75 code_gen.m
--- compiler/code_gen.m 2000/03/20 05:24:39 1.75
+++ compiler/code_gen.m 2000/03/27 09:31:04
@@ -867,8 +867,7 @@
code_info__post_goal_update(GoalInfo)
;
{ Code = empty }
- ),
- !.
+ ).
%---------------------------------------------------------------------------%
Index: compiler/excess.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/excess.m,v
retrieving revision 1.32
diff -u -b -r1.32 excess.m
--- compiler/excess.m 1999/10/25 03:48:47 1.32
+++ compiler/excess.m 2000/03/27 09:31:16
@@ -141,8 +141,7 @@
GoalExpr0 = bi_implication(_, _),
% these should have been expanded out by now
error("detect_cse_in_goal_2: unexpected bi_implication")
- ),
- !.
+ ).
%-----------------------------------------------------------------------------%
Index: compiler/hlds_out.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/hlds_out.m,v
retrieving revision 1.235
diff -u -b -r1.235 hlds_out.m
--- compiler/hlds_out.m 2000/01/13 06:15:45 1.235
+++ compiler/hlds_out.m 2000/03/27 09:31:45
@@ -1794,7 +1794,6 @@
; { CanFail = cannot_fail },
io__write_string(" => ")
),
- !,
hlds_out_write_functor_and_submodes(ConsId, ArgVars, ArgModes,
ModuleInfo, ProgVarSet, InstVarSet, AppendVarnums, Indent).
@@ -1807,7 +1806,6 @@
; { CanFail = cannot_fail },
io__write_string("cannot_fail, ")
),
- !,
io__write_string("mode: "),
mercury_output_uni_mode(Mode, InstVarSet),
io__write_string("\n"),
Index: compiler/mercury_compile.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/mercury_compile.m,v
retrieving revision 1.151
diff -u -b -r1.151 mercury_compile.m
--- compiler/mercury_compile.m 2000/03/26 09:06:54 1.151
+++ compiler/mercury_compile.m 2000/03/28 02:45:22
@@ -137,7 +137,7 @@
;
Arg = Line
},
- process_arg(Arg, Module), !,
+ process_arg(Arg, Module),
{ list__append(Module, Modules0, Modules1) },
process_stdin_arg_list(Modules1, Modules)
;
@@ -158,7 +158,7 @@
process_arg_list_2([], []) --> [].
process_arg_list_2([Arg | Args], [Modules | ModulesList]) -->
- process_arg(Arg, Modules), !,
+ process_arg(Arg, Modules),
( { Args \= [] } -> garbage_collect ; [] ),
process_arg_list_2(Args, ModulesList).
@@ -214,7 +214,7 @@
maybe_write_string(Verbose, ModuleNameString),
maybe_write_string(Verbose, "' and imported interfaces...\n"),
read_mod(ModuleName, ".m", "Reading module", yes, Items, Error,
- FileName), !,
+ FileName),
globals__io_lookup_bool_option(statistics, Stats),
maybe_report_stats(Stats),
process_module(ModuleName, FileName, Items, Error, ModulesToLink).
@@ -228,7 +228,7 @@
maybe_write_string(Verbose, FileName),
maybe_write_string(Verbose, "' and imported interfaces...\n"),
read_mod_from_file(FileName, ".m", "Reading file", yes, Items, Error,
- ModuleName), !,
+ ModuleName),
globals__io_lookup_bool_option(statistics, Stats),
maybe_report_stats(Stats),
{ string__append(FileName, ".m", SourceFileName) },
@@ -378,9 +378,9 @@
% If we are only typechecking or error checking, then we should not
% modify any files, this includes writing to .d files.
mercury_compile__pre_hlds_pass(Module, DontWriteDFile,
- HLDS1, UndefTypes, UndefModes, Errors1), !,
+ HLDS1, UndefTypes, UndefModes, Errors1),
mercury_compile__frontend_pass(HLDS1, HLDS20, UndefTypes,
- UndefModes, Errors2), !,
+ UndefModes, Errors2),
( { Errors1 = no }, { Errors2 = no } ->
globals__io_lookup_bool_option(verbose, Verbose),
globals__io_lookup_bool_option(statistics, Stats),
@@ -413,7 +413,7 @@
{ module_imports_get_module_name(Module, ModuleName) },
mercury_compile__maybe_output_prof_call_graph(HLDS21,
Verbose, Stats, HLDS25),
- mercury_compile__middle_pass(ModuleName, HLDS25, HLDS50), !,
+ mercury_compile__middle_pass(ModuleName, HLDS25, HLDS50),
globals__io_lookup_bool_option(highlevel_code, HighLevelCode),
globals__io_lookup_bool_option(aditi_only, AditiOnly),
@@ -445,7 +445,7 @@
)
;
mercury_compile__backend_pass(HLDS50, HLDS70,
- GlobalData, LLDS), !,
+ GlobalData, LLDS),
mercury_compile__output_pass(HLDS70, GlobalData, LLDS,
MaybeRLFile, ModuleName, _CompileErrors)
)
@@ -479,29 +479,29 @@
% we cant be creating the .trans_opt file.
{ MaybeTransOptDeps = no }
;
- maybe_read_dependency_file(Module, MaybeTransOptDeps), !,
- write_dependency_file(ModuleImports0, MaybeTransOptDeps), !
+ maybe_read_dependency_file(Module, MaybeTransOptDeps),
+ write_dependency_file(ModuleImports0, MaybeTransOptDeps)
),
% Errors in .opt and .trans_opt files result in software errors.
mercury_compile__maybe_grab_optfiles(ModuleImports0, Verbose,
- MaybeTransOptDeps, ModuleImports1, IntermodError), !,
+ MaybeTransOptDeps, ModuleImports1, IntermodError),
{ module_imports_get_items(ModuleImports1, Items1) },
mercury_compile__module_qualify_items(Items1, Items2, Module, Verbose,
- Stats, MQInfo, _, UndefTypes0, UndefModes0), !,
+ Stats, MQInfo, _, UndefTypes0, UndefModes0),
mercury_compile__expand_equiv_types(Items2, Verbose, Stats,
- Items, CircularTypes, EqvMap), !,
+ Items, CircularTypes, EqvMap),
{ bool__or(UndefTypes0, CircularTypes, UndefTypes1) },
mercury_compile__make_hlds(Module, Items, MQInfo, EqvMap, Verbose,
- Stats, HLDS0, UndefTypes2, UndefModes2, FoundError), !,
+ Stats, HLDS0, UndefTypes2, UndefModes2, FoundError),
{ bool__or(UndefTypes1, UndefTypes2, UndefTypes) },
{ bool__or(UndefModes0, UndefModes2, UndefModes) },
- mercury_compile__maybe_dump_hlds(HLDS0, "01", "initial"), !,
+ mercury_compile__maybe_dump_hlds(HLDS0, "01", "initial"),
% Only stop on syntax errors in .opt files.
( { FoundError = yes ; IntermodError = yes } ->
@@ -666,7 +666,7 @@
"% Checking typeclass instances...\n"),
check_typeclass__check_instance_decls(HLDS1, HLDS2,
FoundTypeclassError),
- mercury_compile__maybe_dump_hlds(HLDS2, "02", "typeclass"), !,
+ mercury_compile__maybe_dump_hlds(HLDS2, "02", "typeclass"),
globals__io_lookup_bool_option(intermodule_optimization, Intermod),
globals__io_lookup_bool_option(use_opt_files, UseOptFiles),
@@ -679,7 +679,7 @@
% fills in which pred_ids are needed by instance decls.
{ dead_pred_elim(HLDS2, HLDS2a) },
mercury_compile__maybe_dump_hlds(HLDS2a, "02a",
- "dead_pred_elim"), !
+ "dead_pred_elim")
;
{ HLDS2a = HLDS2 }
),
@@ -687,7 +687,7 @@
%
% Next typecheck the clauses.
%
- typecheck(HLDS2a, HLDS3, FoundTypeError), !,
+ typecheck(HLDS2a, HLDS3, FoundTypeError),
( { FoundTypeError = yes } ->
maybe_write_string(Verbose,
"% Program contains type error(s).\n"),
@@ -740,7 +740,7 @@
% or undefined modes
( { FoundTypeError = no, FoundUndefModeError = no } ->
mercury_compile__maybe_write_optfile(MakeOptInt,
- HLDS4, HLDS5), !
+ HLDS4, HLDS5)
;
{ HLDS5 = HLDS4 }
),
@@ -852,7 +852,7 @@
globals__io_lookup_bool_option(statistics, Stats),
mercury_compile__maybe_termination(HLDS25, Verbose, Stats, HLDS28),
- mercury_compile__maybe_dump_hlds(HLDS28, "28", "termination"), !,
+ mercury_compile__maybe_dump_hlds(HLDS28, "28", "termination"),
trans_opt__write_optfile(HLDS28).
@@ -883,7 +883,7 @@
globals__io_lookup_bool_option(verbose, Verbose),
globals__io_lookup_bool_option(statistics, Stats),
- mercury_compile__maybe_polymorphism(HLDS4, Verbose, Stats, HLDS5), !,
+ mercury_compile__maybe_polymorphism(HLDS4, Verbose, Stats, HLDS5),
mercury_compile__maybe_dump_hlds(HLDS5, "05", "polymorphism"),
mercury_compile__modecheck(HLDS5, Verbose, Stats, HLDS6,
@@ -895,31 +895,27 @@
{ HLDS12 = HLDS6 }
;
mercury_compile__detect_switches(HLDS6, Verbose, Stats, HLDS7),
- !,
mercury_compile__maybe_dump_hlds(HLDS7, "07", "switch_detect"),
- !,
- mercury_compile__detect_cse(HLDS7, Verbose, Stats, HLDS8), !,
- mercury_compile__maybe_dump_hlds(HLDS8, "08", "cse"), !,
+ mercury_compile__detect_cse(HLDS7, Verbose, Stats, HLDS8),
+ mercury_compile__maybe_dump_hlds(HLDS8, "08", "cse"),
mercury_compile__check_determinism(HLDS8, Verbose, Stats, HLDS9,
- FoundDetError), !,
+ FoundDetError),
mercury_compile__maybe_dump_hlds(HLDS9, "09", "determinism"),
- !,
mercury_compile__check_unique_modes(HLDS9, Verbose, Stats,
- HLDS10, FoundUniqError), !,
+ HLDS10, FoundUniqError),
mercury_compile__maybe_dump_hlds(HLDS10, "10", "unique_modes"),
- !,
mercury_compile__check_stratification(HLDS10, Verbose, Stats,
- HLDS11, FoundStratError), !,
+ HLDS11, FoundStratError),
mercury_compile__maybe_dump_hlds(HLDS11, "11",
- "stratification"), !,
+ "stratification"),
mercury_compile__simplify(HLDS11, yes, no, Verbose, Stats,
- process_all_nonimported_procs, HLDS12), !,
- mercury_compile__maybe_dump_hlds(HLDS12, "12", "simplify"), !,
+ process_all_nonimported_procs, HLDS12),
+ mercury_compile__maybe_dump_hlds(HLDS12, "12", "simplify"),
%
% work out whether we encountered any errors
@@ -967,10 +963,10 @@
globals__io_lookup_bool_option(statistics, Stats),
mercury_compile__tabling(HLDS24, Verbose, HLDS25),
- mercury_compile__maybe_dump_hlds(HLDS25, "25", "tabling"), !,
+ mercury_compile__maybe_dump_hlds(HLDS25, "25", "tabling"),
mercury_compile__process_lambdas(HLDS25, Verbose, HLDS26),
- mercury_compile__maybe_dump_hlds(HLDS26, "26", "lambda"), !,
+ mercury_compile__maybe_dump_hlds(HLDS26, "26", "lambda"),
%
% Uncomment the following code to check that unique mode analysis
@@ -983,7 +979,7 @@
{ HLDS27 = HLDS26 },
%mercury_compile__check_unique_modes(HLDS26, Verbose, Stats,
- % HLDS27, FoundUniqError), !,
+ % HLDS27, FoundUniqError),
%
%{ FoundUniqError = yes ->
% error("unique modes failed")
@@ -992,54 +988,52 @@
%},
mercury_compile__maybe_termination(HLDS27, Verbose, Stats, HLDS28),
- mercury_compile__maybe_dump_hlds(HLDS28, "28", "termination"), !,
+ mercury_compile__maybe_dump_hlds(HLDS28, "28", "termination"),
mercury_compile__maybe_type_ctor_infos(HLDS28, Verbose, Stats, HLDS30),
- !,
- mercury_compile__maybe_dump_hlds(HLDS30, "30", "type_ctor_infos"), !,
+ mercury_compile__maybe_dump_hlds(HLDS30, "30", "type_ctor_infos"),
mercury_compile__maybe_bytecodes(HLDS30, ModuleName, Verbose, Stats),
- !,
% stage number 31 is used by mercury_compile__maybe_bytecodes
- mercury_compile__maybe_higher_order(HLDS30, Verbose, Stats, HLDS32), !,
- mercury_compile__maybe_dump_hlds(HLDS32, "32", "higher_order"), !,
+ mercury_compile__maybe_higher_order(HLDS30, Verbose, Stats, HLDS32),
+ mercury_compile__maybe_dump_hlds(HLDS32, "32", "higher_order"),
mercury_compile__maybe_introduce_accumulators(HLDS32,
- Verbose, Stats, HLDS33), !,
- mercury_compile__maybe_dump_hlds(HLDS33, "33", "accum"), !,
+ Verbose, Stats, HLDS33),
+ mercury_compile__maybe_dump_hlds(HLDS33, "33", "accum"),
- mercury_compile__maybe_do_inlining(HLDS33, Verbose, Stats, HLDS34), !,
- mercury_compile__maybe_dump_hlds(HLDS34, "34", "inlining"), !,
+ mercury_compile__maybe_do_inlining(HLDS33, Verbose, Stats, HLDS34),
+ mercury_compile__maybe_dump_hlds(HLDS34, "34", "inlining"),
mercury_compile__maybe_deforestation(HLDS34,
- Verbose, Stats, HLDS36), !,
- mercury_compile__maybe_dump_hlds(HLDS36, "36", "deforestation"), !,
+ Verbose, Stats, HLDS36),
+ mercury_compile__maybe_dump_hlds(HLDS36, "36", "deforestation"),
- mercury_compile__maybe_unused_args(HLDS36, Verbose, Stats, HLDS39), !,
- mercury_compile__maybe_dump_hlds(HLDS39, "39", "unused_args"), !,
+ mercury_compile__maybe_unused_args(HLDS36, Verbose, Stats, HLDS39),
+ mercury_compile__maybe_dump_hlds(HLDS39, "39", "unused_args"),
- mercury_compile__maybe_lco(HLDS39, Verbose, Stats, HLDS40), !,
- mercury_compile__maybe_dump_hlds(HLDS40, "40", "lco"), !,
+ mercury_compile__maybe_lco(HLDS39, Verbose, Stats, HLDS40),
+ mercury_compile__maybe_dump_hlds(HLDS40, "40", "lco"),
% DNF transformations should be after inlining.
- mercury_compile__maybe_transform_dnf(HLDS40, Verbose, Stats, HLDS44), !,
- mercury_compile__maybe_dump_hlds(HLDS44, "44", "dnf"), !,
+ mercury_compile__maybe_transform_dnf(HLDS40, Verbose, Stats, HLDS44),
+ mercury_compile__maybe_dump_hlds(HLDS44, "44", "dnf"),
% Magic sets should be the last thing done to Aditi procedures
% before RL code generation, and must come immediately after DNF.
- mercury_compile__maybe_magic(HLDS44, Verbose, Stats, HLDS46), !,
- mercury_compile__maybe_dump_hlds(HLDS46, "46", "magic"), !,
+ mercury_compile__maybe_magic(HLDS44, Verbose, Stats, HLDS46),
+ mercury_compile__maybe_dump_hlds(HLDS46, "46", "magic"),
- mercury_compile__maybe_dead_procs(HLDS46, Verbose, Stats, HLDS48), !,
- mercury_compile__maybe_dump_hlds(HLDS48, "48", "dead_procs"), !,
+ mercury_compile__maybe_dead_procs(HLDS46, Verbose, Stats, HLDS48),
+ mercury_compile__maybe_dump_hlds(HLDS48, "48", "dead_procs"),
% map_args_to_regs affects the interface to a predicate,
% so it must be done in one phase immediately before code generation
- mercury_compile__map_args_to_regs(HLDS48, Verbose, Stats, HLDS49), !,
- mercury_compile__maybe_dump_hlds(HLDS49, "49", "args_to_regs"), !,
+ mercury_compile__map_args_to_regs(HLDS48, Verbose, Stats, HLDS49),
+ mercury_compile__maybe_dump_hlds(HLDS49, "49", "args_to_regs"),
{ HLDS50 = HLDS49 },
mercury_compile__maybe_dump_hlds(HLDS49, "50", "middle_pass").
@@ -1089,42 +1083,41 @@
globals__io_lookup_bool_option(verbose, Verbose),
globals__io_lookup_bool_option(statistics, Stats),
- mercury_compile__maybe_followcode(HLDS50, Verbose, Stats, HLDS52), !,
- mercury_compile__maybe_dump_hlds(HLDS52, "52", "followcode"), !,
+ mercury_compile__maybe_followcode(HLDS50, Verbose, Stats, HLDS52),
+ mercury_compile__maybe_dump_hlds(HLDS52, "52", "followcode"),
mercury_compile__simplify(HLDS52, no, yes, Verbose, Stats,
- process_all_nonimported_nonaditi_procs, HLDS53), !,
- mercury_compile__maybe_dump_hlds(HLDS53, "53", "simplify2"), !,
+ process_all_nonimported_nonaditi_procs, HLDS53),
+ mercury_compile__maybe_dump_hlds(HLDS53, "53", "simplify2"),
- mercury_compile__maybe_saved_vars(HLDS53, Verbose, Stats, HLDS56), !,
- mercury_compile__maybe_dump_hlds(HLDS56, "56", "savedvars"), !,
+ mercury_compile__maybe_saved_vars(HLDS53, Verbose, Stats, HLDS56),
+ mercury_compile__maybe_dump_hlds(HLDS56, "56", "savedvars"),
- mercury_compile__compute_liveness(HLDS56, Verbose, Stats, HLDS59), !,
- mercury_compile__maybe_dump_hlds(HLDS59, "59", "liveness"), !,
+ mercury_compile__compute_liveness(HLDS56, Verbose, Stats, HLDS59),
+ mercury_compile__maybe_dump_hlds(HLDS59, "59", "liveness"),
- mercury_compile__compute_stack_vars(HLDS59, Verbose, Stats, HLDS65), !,
- mercury_compile__maybe_dump_hlds(HLDS65, "65", "stackvars"), !,
+ mercury_compile__compute_stack_vars(HLDS59, Verbose, Stats, HLDS65),
+ mercury_compile__maybe_dump_hlds(HLDS65, "65", "stackvars"),
- mercury_compile__allocate_store_map(HLDS65, Verbose, Stats, HLDS68), !,
- mercury_compile__maybe_dump_hlds(HLDS68, "68", "store_map"), !,
+ mercury_compile__allocate_store_map(HLDS65, Verbose, Stats, HLDS68),
+ mercury_compile__maybe_dump_hlds(HLDS68, "68", "store_map"),
- mercury_compile__maybe_goal_paths(HLDS68, Verbose, Stats, HLDS72), !,
- mercury_compile__maybe_dump_hlds(HLDS72, "72", "goal_path"), !,
+ mercury_compile__maybe_goal_paths(HLDS68, Verbose, Stats, HLDS72),
+ mercury_compile__maybe_dump_hlds(HLDS72, "72", "goal_path"),
maybe_report_sizes(HLDS72),
{ HLDS90 = HLDS72 },
- mercury_compile__maybe_dump_hlds(HLDS90, "90", "precodegen"), !,
+ mercury_compile__maybe_dump_hlds(HLDS90, "90", "precodegen"),
{ global_data_init(GlobalData0) },
mercury_compile__generate_code(HLDS90, GlobalData0, Verbose, Stats,
HLDS99, GlobalData1, LLDS1),
- !,
- mercury_compile__maybe_dump_hlds(HLDS99, "99", "codegen"), !,
+ mercury_compile__maybe_dump_hlds(HLDS99, "99", "codegen"),
mercury_compile__maybe_generate_stack_layouts(HLDS99, GlobalData1,
- LLDS1, Verbose, Stats, GlobalData), !,
+ LLDS1, Verbose, Stats, GlobalData),
% mercury_compile__maybe_dump_global_data(GlobalData),
mercury_compile__maybe_do_optimize(LLDS1, GlobalData, Verbose, Stats,
@@ -1177,7 +1170,7 @@
),
mercury_compile__backend_pass_by_preds_3(ProcIds, PredId,
PredInfo, ModuleInfo0, ModuleInfo1,
- GlobalData0, GlobalData1, Code1), !
+ GlobalData0, GlobalData1, Code1)
),
mercury_compile__backend_pass_by_preds_2(PredIds,
ModuleInfo1, ModuleInfo, GlobalData1, GlobalData, Code2),
@@ -2293,6 +2286,12 @@
;
SubDirInclOpt = ""
},
+ globals__io_lookup_string_option(c_include_directory, C_INCL),
+ { C_INCL = "" ->
+ InclOpt = ""
+ ;
+ string__append_list(["-I", C_INCL, " "], InclOpt)
+ },
globals__io_lookup_accumulating_option(c_include_directory,
C_Incl_Dirs),
{ InclOpt = string__append_list(list__condense(list__map(
@@ -2309,7 +2308,8 @@
;
{ HighLevelCodeOpt = "" }
),
- globals__io_lookup_bool_option(gcc_nested_functions, GCC_NestedFunctions),
+ globals__io_lookup_bool_option(gcc_nested_functions,
+ GCC_NestedFunctions),
( { GCC_NestedFunctions = yes } ->
{ NestedFunctionsOpt = "-DMR_USE_GCC_NESTED_FUNCTIONS " }
;
Index: compiler/mode_util.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/mode_util.m,v
retrieving revision 1.120
diff -u -b -r1.120 mode_util.m
--- compiler/mode_util.m 2000/03/17 14:24:43 1.120
+++ compiler/mode_util.m 2000/03/27 09:33:54
@@ -529,8 +529,7 @@
inst_lookup_2(TypedInstName, ModuleInfo, Inst0),
map__init(Subst),
propagate_type_into_inst(Type, Subst, ModuleInfo, Inst0, Inst)
- ),
- !.
+ ).
%-----------------------------------------------------------------------------%
Index: compiler/optimize.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/optimize.m,v
retrieving revision 1.22
diff -u -b -r1.22 optimize.m
--- compiler/optimize.m 2000/02/10 04:37:36 1.22
+++ compiler/optimize.m 2000/03/27 12:43:07
@@ -36,7 +36,7 @@
optimize_main([], _, []) --> [].
optimize_main([Proc0 | Procs0], GlobalData, [Proc | Procs]) -->
- optimize__proc(Proc0, GlobalData, Proc), !,
+ optimize__proc(Proc0, GlobalData, Proc),
optimize_main(Procs0, GlobalData, Procs).
optimize__proc(CProc0, GlobalData, CProc) -->
Index: compiler/prog_io.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/prog_io.m,v
retrieving revision 1.187
diff -u -b -r1.187 prog_io.m
--- compiler/prog_io.m 2000/02/16 07:27:13 1.187
+++ compiler/prog_io.m 2000/03/27 12:43:30
@@ -2313,12 +2313,12 @@
:- pred process_maybe1(maker(T1, T2), maybe1(T1), maybe1(T2)).
:- mode process_maybe1(maker, in, out) is det.
-process_maybe1(Maker, ok(X), ok(Y)) :- !, call(Maker, X, Y).
+process_maybe1(Maker, ok(X), ok(Y)) :- call(Maker, X, Y).
process_maybe1(_, error(M, T), error(M, T)).
:- pred process_maybe1_to_t(maker(T1, maybe1(T2)), maybe1(T1), maybe1(T2)).
:- mode process_maybe1_to_t(maker, in, out) is det.
-process_maybe1_to_t(Maker, ok(X), Y) :- !, call(Maker, X, Y).
+process_maybe1_to_t(Maker, ok(X), Y) :- call(Maker, X, Y).
process_maybe1_to_t(_, error(M, T), error(M, T)).
%-----------------------------------------------------------------------------%
Index: compiler/saved_vars.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/saved_vars.m,v
retrieving revision 1.22
diff -u -b -r1.22 saved_vars.m
--- compiler/saved_vars.m 1999/10/25 03:49:38 1.22
+++ compiler/saved_vars.m 2000/03/27 09:34:03
@@ -141,8 +141,7 @@
GoalExpr0 = bi_implication(_, _),
% these should have been expanded out by now
error("saved_vars_in_goal: unexpected bi_implication")
- ),
- !.
+ ).
%-----------------------------------------------------------------------------%
cvs diff: Diffing compiler/notes
cvs diff: Diffing debian
cvs diff: Diffing doc
cvs diff: Diffing extras
cvs diff: Diffing extras/aditi
cvs diff: Diffing extras/cgi
cvs diff: Diffing extras/complex_numbers
cvs diff: Diffing extras/complex_numbers/samples
cvs diff: Diffing extras/complex_numbers/tests
cvs diff: Diffing extras/concurrency
cvs diff: Diffing extras/curses
cvs diff: Diffing extras/curses/sample
cvs diff: Diffing extras/dynamic_linking
cvs diff: Diffing extras/graphics
cvs diff: Diffing extras/graphics/mercury_opengl
cvs diff: Diffing extras/graphics/mercury_tcltk
cvs diff: Diffing extras/graphics/samples
cvs diff: Diffing extras/graphics/samples/calc
cvs diff: Diffing extras/graphics/samples/maze
cvs diff: Diffing extras/graphics/samples/pent
cvs diff: Diffing extras/lazy_evaluation
cvs diff: Diffing extras/morphine
cvs diff: Diffing extras/morphine/non-regression-tests
cvs diff: Diffing extras/morphine/scripts
cvs diff: Diffing extras/morphine/source
cvs diff: Diffing extras/odbc
cvs diff: Diffing extras/posix
cvs diff: Diffing extras/references
cvs diff: Diffing extras/references/samples
cvs diff: Diffing extras/references/tests
cvs diff: Diffing extras/trailed_update
cvs diff: Diffing extras/trailed_update/samples
cvs diff: Diffing extras/trailed_update/tests
cvs diff: Diffing library
Index: library/builtin.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/builtin.m,v
retrieving revision 1.29
diff -u -b -r1.29 builtin.m
--- library/builtin.m 2000/03/24 10:27:37 1.29
+++ library/builtin.m 2000/03/28 02:32:10
@@ -148,19 +148,6 @@
%-----------------------------------------------------------------------------%
-
-% We define !/0 (and !/2 for dcgs) to be equivalent to `true'. This is for
-% backwards compatibility with Prolog systems. But of course it only works
-% if all your cuts are green cuts.
-
-:- pred ! is det.
-
-:- pred !(T, T).
-:- mode !(di, uo) is det.
-:- mode !(in, out) is det.
-
-%-----------------------------------------------------------------------------%
-
% unify(X, Y) is true iff X = Y.
:- pred unify(T::in, T::in) is semidet.
@@ -223,11 +210,6 @@
(Y :: out(pred(out) is semidet)),
[will_not_call_mercury, thread_safe],
"Y = X;").
-
-%-----------------------------------------------------------------------------%
-
-!.
-!(X, X).
%-----------------------------------------------------------------------------%
Index: library/lexer.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/lexer.m,v
retrieving revision 1.33
diff -u -b -r1.33 lexer.m
--- library/lexer.m 2000/01/05 04:22:18 1.33
+++ library/lexer.m 2000/03/27 08:53:04
@@ -273,10 +273,10 @@
lexer__get_token(Token, Context) -->
io__read_char(Result),
- ( { Result = error(Error) }, !,
+ ( { Result = error(Error) },
lexer__get_context(Context),
{ Token = io_error(Error) }
- ; { Result = eof }, !,
+ ; { Result = eof },
lexer__get_context(Context),
{ Token = eof }
; { Result = ok(Char) },
@@ -393,10 +393,10 @@
lexer__get_token_2(Token, Context) -->
io__read_char(Result),
- ( { Result = error(Error) }, !,
+ ( { Result = error(Error) },
lexer__get_context(Context),
{ Token = io_error(Error) }
- ; { Result = eof }, !,
+ ; { Result = eof },
lexer__get_context(Context),
{ Token = eof }
; { Result = ok(Char) },
@@ -538,9 +538,9 @@
lexer__get_dot(Token) -->
io__read_char(Result),
- ( { Result = error(Error) }, !,
+ ( { Result = error(Error) },
{ Token = io_error(Error) }
- ; { Result = eof }, !,
+ ; { Result = eof },
{ Token = end }
; { Result = ok(Char) },
( { lexer__whitespace_after_dot(Char) } ->
@@ -594,10 +594,10 @@
lexer__skip_to_eol(Token, Context) -->
io__read_char(Result),
- ( { Result = error(Error) }, !,
+ ( { Result = error(Error) },
lexer__get_context(Context),
{ Token = io_error(Error) }
- ; { Result = eof }, !,
+ ; { Result = eof },
lexer__get_context(Context),
{ Token = eof }
; { Result = ok(Char) },
@@ -630,10 +630,10 @@
lexer__get_slash(Token, Context) -->
io__read_char(Result),
- ( { Result = error(Error) }, !,
+ ( { Result = error(Error) },
lexer__get_context(Context),
{ Token = io_error(Error) }
- ; { Result = eof }, !,
+ ; { Result = eof },
lexer__get_context(Context),
{ Token = name("/") }
; { Result = ok(Char) },
@@ -676,10 +676,10 @@
lexer__get_comment(Token, Context) -->
io__read_char(Result),
- ( { Result = error(Error) }, !,
+ ( { Result = error(Error) },
lexer__get_context(Context),
{ Token = io_error(Error) }
- ; { Result = eof }, !,
+ ; { Result = eof },
lexer__get_context(Context),
{ Token = error("unterminated '/*' comment") }
; { Result = ok(Char) },
@@ -713,10 +713,10 @@
lexer__get_comment_2(Token, Context) -->
io__read_char(Result),
- ( { Result = error(Error) }, !,
+ ( { Result = error(Error) },
lexer__get_context(Context),
{ Token = io_error(Error) }
- ; { Result = eof }, !,
+ ; { Result = eof },
lexer__get_context(Context),
{ Token = error("unterminated '/*' comment") }
; { Result = ok(Char) },
@@ -761,9 +761,9 @@
lexer__get_quoted_name(QuoteChar, Chars, Token) -->
io__read_char(Result),
- ( { Result = error(Error) }, !,
+ ( { Result = error(Error) },
{ Token = io_error(Error) }
- ; { Result = eof }, !,
+ ; { Result = eof },
{ Token = error("unterminated quote") }
; { Result = ok(Char) },
( { Char = QuoteChar } ->
@@ -804,9 +804,9 @@
lexer__get_quoted_name_quote(QuoteChar, Chars, Token) -->
io__read_char(Result),
- ( { Result = error(Error) }, !,
+ ( { Result = error(Error) },
{ Token = io_error(Error) }
- ; { Result = eof }, !,
+ ; { Result = eof },
{ lexer__finish_quoted_name(QuoteChar, Chars, Token) }
; { Result = ok(Char) },
( { Char = QuoteChar } ->
@@ -857,11 +857,11 @@
lexer__get_quoted_name_escape(QuoteChar, Chars, Token) -->
io__read_char(Result),
- ( { Result = error(Error) }, !,
+ ( { Result = error(Error) },
{ Token = io_error(Error) }
- ; { Result = eof }, !,
+ ; { Result = eof },
{ Token = error("unterminated quoted name") }
- ; { Result = ok(Char) }, !,
+ ; { Result = ok(Char) },
( { Char = '\n' } ->
lexer__get_quoted_name(QuoteChar, Chars, Token)
; { lexer__escape_char(Char, EscapedChar) } ->
@@ -930,11 +930,11 @@
lexer__get_hex_escape(QuoteChar, Chars, HexChars, Token) -->
io__read_char(Result),
- ( { Result = error(Error) }, !,
+ ( { Result = error(Error) },
{ Token = io_error(Error) }
- ; { Result = eof }, !,
+ ; { Result = eof },
{ Token = error("unterminated quote") }
- ; { Result = ok(Char) }, !,
+ ; { Result = ok(Char) },
( { char__is_hex_digit(Char) } ->
lexer__get_hex_escape(QuoteChar, Chars,
[Char | HexChars], Token)
@@ -1020,11 +1020,11 @@
lexer__get_octal_escape(QuoteChar, Chars, OctalChars, Token) -->
io__read_char(Result),
- ( { Result = error(Error) }, !,
+ ( { Result = error(Error) },
{ Token = io_error(Error) }
- ; { Result = eof }, !,
+ ; { Result = eof },
{ Token = error("unterminated quote") }
- ; { Result = ok(Char) }, !,
+ ; { Result = ok(Char) },
( { char__is_octal_digit(Char) } ->
lexer__get_octal_escape(QuoteChar, Chars,
[Char | OctalChars], Token)
@@ -1131,9 +1131,9 @@
lexer__get_name(Chars, Token) -->
io__read_char(Result),
- ( { Result = error(Error) }, !,
+ ( { Result = error(Error) },
{ Token = io_error(Error) }
- ; { Result = eof }, !,
+ ; { Result = eof },
{ lexer__rev_char_list_to_string(Chars, Name) },
{ Token = name(Name) }
; { Result = ok(Char) },
@@ -1184,10 +1184,10 @@
lexer__get_source_line_number(Chars, Token, Context) -->
io__read_char(Result),
- ( { Result = error(Error) }, !,
+ ( { Result = error(Error) },
lexer__get_context(Context),
{ Token = io_error(Error) }
- ; { Result = eof }, !,
+ ; { Result = eof },
lexer__get_context(Context),
{ Token = error(
"unexpected end-of-file in `#' line number directive") }
@@ -1269,9 +1269,9 @@
lexer__get_graphic(Chars, Token) -->
io__read_char(Result),
- ( { Result = error(Error) }, !,
+ ( { Result = error(Error) },
{ Token = io_error(Error) }
- ; { Result = eof }, !,
+ ; { Result = eof },
{ lexer__rev_char_list_to_string(Chars, Name) },
{ Token = name(Name) }
; { Result = ok(Char) },
@@ -1310,9 +1310,9 @@
lexer__get_variable(Chars, Token) -->
io__read_char(Result),
- ( { Result = error(Error) }, !,
+ ( { Result = error(Error) },
{ Token = io_error(Error) }
- ; { Result = eof }, !,
+ ; { Result = eof },
{ lexer__rev_char_list_to_string(Chars, VariableName) },
{ Token = variable(VariableName) }
; { Result = ok(Char) },
@@ -1355,9 +1355,9 @@
lexer__get_zero(Token) -->
io__read_char(Result),
- ( { Result = error(Error) }, !,
+ ( { Result = error(Error) },
{ Token = io_error(Error) }
- ; { Result = eof }, !,
+ ; { Result = eof },
{ Token = integer(0) }
; { Result = ok(Char) },
( { char__is_digit(Char) } ->
@@ -1422,9 +1422,9 @@
lexer__get_char_code(Token) -->
io__read_char(Result),
- ( { Result = error(Error) }, !,
+ ( { Result = error(Error) },
{ Token = io_error(Error) }
- ; { Result = eof }, !,
+ ; { Result = eof },
{ Token = error("unterminated char code constant") }
; { Result = ok(Char) },
{ char__to_int(Char, CharCode) },
@@ -1450,9 +1450,9 @@
lexer__get_binary(Token) -->
io__read_char(Result),
- ( { Result = error(Error) }, !,
+ ( { Result = error(Error) },
{ Token = io_error(Error) }
- ; { Result = eof }, !,
+ ; { Result = eof },
{ Token = error("unterminated binary constant") }
; { Result = ok(Char) },
( { char__is_binary_digit(Char) } ->
@@ -1487,9 +1487,9 @@
lexer__get_binary_2(Chars, Token) -->
io__read_char(Result),
- ( { Result = error(Error) }, !,
+ ( { Result = error(Error) },
{ Token = io_error(Error) }
- ; { Result = eof }, !,
+ ; { Result = eof },
{ lexer__rev_char_list_to_int(Chars, 2, Token) }
; { Result = ok(Char) },
( { char__is_binary_digit(Char) } ->
@@ -1526,9 +1526,9 @@
lexer__get_octal(Token) -->
io__read_char(Result),
- ( { Result = error(Error) }, !,
+ ( { Result = error(Error) },
{ Token = io_error(Error) }
- ; { Result = eof }, !,
+ ; { Result = eof },
{ Token = error("unterminated octal constant") }
; { Result = ok(Char) },
( { char__is_octal_digit(Char) } ->
@@ -1563,9 +1563,9 @@
lexer__get_octal_2(Chars, Token) -->
io__read_char(Result),
- ( { Result = error(Error) }, !,
+ ( { Result = error(Error) },
{ Token = io_error(Error) }
- ; { Result = eof }, !,
+ ; { Result = eof },
{ lexer__rev_char_list_to_int(Chars, 8, Token) }
; { Result = ok(Char) },
( { char__is_octal_digit(Char) } ->
@@ -1602,9 +1602,9 @@
lexer__get_hex(Token) -->
io__read_char(Result),
- ( { Result = error(Error) }, !,
+ ( { Result = error(Error) },
{ Token = io_error(Error) }
- ; { Result = eof }, !,
+ ; { Result = eof },
{ Token = error("unterminated hex constant") }
; { Result = ok(Char) },
( { char__is_hex_digit(Char) } ->
@@ -1640,9 +1640,9 @@
lexer__get_hex_2(Chars, Token) -->
io__read_char(Result),
- ( { Result = error(Error) }, !,
+ ( { Result = error(Error) },
{ Token = io_error(Error) }
- ; { Result = eof }, !,
+ ; { Result = eof },
{ lexer__rev_char_list_to_int(Chars, 16, Token) }
; { Result = ok(Char) },
( { char__is_hex_digit(Char) } ->
@@ -1680,9 +1680,9 @@
lexer__get_number(Chars, Token) -->
io__read_char(Result),
- ( { Result = error(Error) }, !,
+ ( { Result = error(Error) },
{ Token = io_error(Error) }
- ; { Result = eof }, !,
+ ; { Result = eof },
{ lexer__rev_char_list_to_int(Chars, 10, Token) }
; { Result = ok(Char) },
( { char__is_digit(Char) } ->
@@ -1731,9 +1731,9 @@
lexer__get_int_dot(Chars, Token) -->
io__read_char(Result),
- ( { Result = error(Error) }, !,
+ ( { Result = error(Error) },
{ Token = io_error(Error) }
- ; { Result = eof }, !,
+ ; { Result = eof },
io__putback_char('.'),
{ lexer__rev_char_list_to_int(Chars, 10, Token) }
; { Result = ok(Char) },
@@ -1776,9 +1776,9 @@
lexer__get_float_decimals(Chars, Token) -->
io__read_char(Result),
- ( { Result = error(Error) }, !,
+ ( { Result = error(Error) },
{ Token = io_error(Error) }
- ; { Result = eof }, !,
+ ; { Result = eof },
{ lexer__rev_char_list_to_float(Chars, Token) }
; { Result = ok(Char) },
( { char__is_digit(Char) } ->
@@ -1820,9 +1820,9 @@
lexer__get_float_exponent(Chars, Token) -->
io__read_char(Result),
- ( { Result = error(Error) }, !,
+ ( { Result = error(Error) },
{ Token = io_error(Error) }
- ; { Result = eof }, !,
+ ; { Result = eof },
{ lexer__rev_char_list_to_float(Chars, Token) }
; { Result = ok(Char) },
( { Char = ('+') ; Char = ('-') } ->
@@ -1870,9 +1870,9 @@
lexer__get_float_exponent_2(Chars, Token) -->
io__read_char(Result),
- ( { Result = error(Error) }, !,
+ ( { Result = error(Error) },
{ Token = io_error(Error) }
- ; { Result = eof }, !,
+ ; { Result = eof },
{ Token = error("unterminated exponent in float token") }
; { Result = ok(Char) },
( { char__is_digit(Char) } ->
@@ -1918,9 +1918,9 @@
lexer__get_float_exponent_3(Chars, Token) -->
io__read_char(Result),
- ( { Result = error(Error) }, !,
+ ( { Result = error(Error) },
{ Token = io_error(Error) }
- ; { Result = eof }, !,
+ ; { Result = eof },
{ lexer__rev_char_list_to_float(Chars, Token) }
; { Result = ok(Char) },
( { char__is_digit(Char) } ->
Index: library/ops.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/ops.m,v
retrieving revision 1.29
diff -u -b -r1.29 ops.m
--- library/ops.m 2000/01/25 04:10:07 1.29
+++ library/ops.m 2000/03/27 08:56:43
@@ -96,21 +96,21 @@
ops__op_specifier_to_class(fxy, binary_prefix(x,y)).
ops__lookup_infix_op(_OpTable, Name, Priority, LeftAssoc, RightAssoc) :-
- ops__op_table(Name, after, Specifier, Priority), !,
+ ops__op_table(Name, after, Specifier, Priority),
ops__op_specifier_to_class(Specifier,
infix(LeftAssoc, RightAssoc)).
ops__lookup_prefix_op(_OpTable, Name, Priority, LeftAssoc) :-
- ops__op_table(Name, before, Specifier, Priority), !,
+ ops__op_table(Name, before, Specifier, Priority),
ops__op_specifier_to_class(Specifier, prefix(LeftAssoc)).
ops__lookup_binary_prefix_op(_OpTable, Name, Priority, LeftAssoc, RightAssoc) :-
- ops__op_table(Name, before, Specifier, Priority), !,
+ ops__op_table(Name, before, Specifier, Priority),
ops__op_specifier_to_class(Specifier,
binary_prefix(LeftAssoc, RightAssoc)).
ops__lookup_postfix_op(_OpTable, Name, Priority, LeftAssoc) :-
- ops__op_table(Name, after, Specifier, Priority), !,
+ ops__op_table(Name, after, Specifier, Priority),
ops__op_specifier_to_class(Specifier, postfix(LeftAssoc)).
ops__lookup_op(_OpTable, Name) :-
cvs diff: Diffing profiler
cvs diff: Diffing robdd
cvs diff: Diffing runtime
cvs diff: Diffing runtime/GETOPT
cvs diff: Diffing runtime/machdeps
cvs diff: Diffing samples
cvs diff: Diffing samples/c_interface
cvs diff: Diffing samples/c_interface/c_calls_mercury
cvs diff: Diffing samples/c_interface/cplusplus_calls_mercury
cvs diff: Diffing samples/c_interface/mercury_calls_c
cvs diff: Diffing samples/c_interface/mercury_calls_cplusplus
cvs diff: Diffing samples/c_interface/mercury_calls_fortran
cvs diff: Diffing samples/c_interface/simpler_c_calls_mercury
cvs diff: Diffing samples/c_interface/simpler_cplusplus_calls_mercury
cvs diff: Diffing samples/diff
cvs diff: Diffing samples/muz
cvs diff: Diffing samples/rot13
cvs diff: Diffing samples/solutions
cvs diff: Diffing samples/tests
cvs diff: Diffing samples/tests/c_interface
cvs diff: Diffing samples/tests/c_interface/c_calls_mercury
cvs diff: Diffing samples/tests/c_interface/cplusplus_calls_mercury
cvs diff: Diffing samples/tests/c_interface/mercury_calls_c
cvs diff: Diffing samples/tests/c_interface/mercury_calls_cplusplus
cvs diff: Diffing samples/tests/c_interface/mercury_calls_fortran
cvs diff: Diffing samples/tests/c_interface/simpler_c_calls_mercury
cvs diff: Diffing samples/tests/c_interface/simpler_cplusplus_calls_mercury
cvs diff: Diffing samples/tests/diff
cvs diff: Diffing samples/tests/muz
cvs diff: Diffing samples/tests/rot13
cvs diff: Diffing samples/tests/solutions
cvs diff: Diffing samples/tests/toplevel
cvs diff: Diffing scripts
cvs diff: Diffing tests
cvs diff: Diffing tests/benchmarks
cvs diff: Diffing tests/debugger
cvs diff: Diffing tests/debugger/declarative
cvs diff: Diffing tests/dppd
cvs diff: Diffing tests/general
cvs diff: Diffing tests/general/accumulator
cvs diff: Diffing tests/hard_coded
cvs diff: Diffing tests/hard_coded/exceptions
cvs diff: Diffing tests/hard_coded/sub-modules
cvs diff: Diffing tests/hard_coded/typeclasses
cvs diff: Diffing tests/invalid
cvs diff: Diffing tests/misc_tests
cvs diff: Diffing tests/tabling
cvs diff: Diffing tests/term
cvs diff: Diffing tests/valid
cvs diff: Diffing tests/warnings
cvs diff: Diffing tools
cvs diff: Diffing trace
cvs diff: Diffing trial
cvs diff: Diffing util
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list