diff: map.nu.nl trivial change

Fergus Henderson fjh at cs.mu.oz.au
Mon Jul 14 13:42:21 AEST 1997


library/map.nu.nl:
	Split the call to error/1 inside map__lookup into a separate
	predicate map_error/1, so that you can set a spy point on it.

Index: map.nu.nl
===================================================================
RCS file: /home/staff/zs/imp/mercury/library/map.nu.nl,v
retrieving revision 1.2
diff -u -r1.2 map.nu.nl
--- map.nu.nl	1997/05/20 03:19:10	1.2
+++ map.nu.nl	1997/07/14 03:41:36
@@ -19,6 +19,11 @@
 	( tree234__search(Map, K, V1) ->
 		V = V1
 	;
-		error("map__lookup: key not found")
+		map__lookup_error(Map, K, V)
 	).
+
+% map__lookup_error is a separate predicate because it is handy
+% to be able to set a spy point on it...
+map__lookup_error(_Map, _K, _V) :-
+	error("map__lookup: key not found").
 

-- 
Fergus Henderson <fjh at cs.mu.oz.au>   |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>   |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3         |     -- the last words of T. S. Garp.



More information about the developers mailing list