[m-rev.] trivial diff: fix dir_test.m
Simon Taylor
stayl at cs.mu.OZ.AU
Tue Aug 5 20:50:55 AEST 2003
Estimated hours taken: 0.1
Branches: main
tests/hard_coded/dir_test.m:
Remove use of try_det.
Index: dir_test.m
===================================================================
RCS file: /home/mercury1/repository/tests/hard_coded/dir_test.m,v
retrieving revision 1.2
diff -u -u -r1.2 dir_test.m
--- dir_test.m 28 Jul 2003 15:50:45 -0000 1.2
+++ dir_test.m 5 Aug 2003 10:42:59 -0000
@@ -4,7 +4,7 @@
:- import_module io.
-:- pred main(io__state::di, io__state::uo) is det.
+:- pred main(io__state::di, io__state::uo) is cc_multi.
:- implementation.
@@ -223,7 +223,7 @@
{ error(Msg ++ " " ++ io__error_message(Error)) }
).
-:- pred run_test(string::in, io__state::di, io__state::uo) is det.
+:- pred run_test(string::in, io__state::di, io__state::uo) is cc_multi.
run_test(PathName) -->
test_split_name(PathName),
@@ -233,7 +233,7 @@
test_path_name_is_root_directory(PathName),
io__nl.
-:- pred test_split_name(string::in, io__state::di, io__state::uo) is det.
+:- pred test_split_name(string::in, io__state::di, io__state::uo) is cc_multi.
test_split_name(PathName) -->
io__write_string("dir__split_name("""),
@@ -300,7 +300,7 @@
).
:- pred test_make_path_name(string::in, string::in,
- io__state::di, io__state::uo) is det.
+ io__state::di, io__state::uo) is cc_multi.
test_make_path_name(DirName, FileName) -->
io__write_string("\""),
@@ -308,8 +308,7 @@
io__write_string("\"/\""),
io__write_string(FileName),
io__write_string("\""),
- { Res = promise_only_solution(try_det(
- (pred(R::out) is det :- R = DirName/FileName))) },
+ { try((pred(R::out) is det :- R = DirName/FileName), Res) },
(
{ Res = succeeded(Path) },
io__write_string(" = """),
--------------------------------------------------------------------------
mercury-reviews mailing list
post: mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the reviews
mailing list