[m-rev.] diff: Avoid deprecated predicates in extras/error

Paul Bone paul at bone.id.au
Thu Jan 19 16:47:10 AEDT 2017


Avoid deprecated predicates in extras/error

extras/error/error.m:
    Avoid the deprecated takewhile predicate.
---
 extras/error/error.m | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/extras/error/error.m b/extras/error/error.m
index 83c9c76..33e282e 100644
--- a/extras/error/error.m
+++ b/extras/error/error.m
@@ -180,13 +180,13 @@ insert_error(FileName, LineNumber, Message, !ErrorMap) :-
     message::out) is semidet.
 
 parse_error(Chars, File, Line, Message) :-
-    takewhile((pred(C0::in) is semidet :-
+    take_while((pred(C0::in) is semidet :-
         C0 \= (':')
     ), Chars, FileChars, [_|Rest0]),
-    takewhile((pred(C1::in) is semidet :-
+    take_while((pred(C1::in) is semidet :-
         C1 \= (':')
     ), Rest0, LineChars, [_|Rest1]), % throw away the :
-    takewhile((pred(C2::in) is semidet :-
+    take_while((pred(C2::in) is semidet :-
         C2 \= ('\n')
     ), Rest1, MsgChars, _),
     string.from_char_list(FileChars, File),
-- 
2.7.4



More information about the reviews mailing list