Files
mercury/tests/hard_coded/float_map.m
Julien Fischer 9f68c330f0 Change the argument order of many of the predicates in the map, bimap, and
Branches: main

Change the argument order of many of the predicates in the map, bimap, and
multi_map modules so they are more conducive to the use of state variable
notation, i.e. make the order the same as in the sv* modules.

Prepare for the deprecation of the sv{bimap,map,multi_map} modules by
removing their use throughout the system.

library/bimap.m:
library/map.m:
library/multi_map.m:
	As above.
NEWS:
	Announce the change.

	Separate out the "highlights" from the "detailed listing" for
	the post-11.01 NEWS.

	Reorganise the announcement of the Unicode support.

benchmarks/*/*.m:
browser/*.m:
compiler/*.m:
deep_profiler/*.m:
extras/*/*.m:
mdbcomp/*.m:
profiler/*.m:
tests/*/*.m:
ssdb/*.m:
samples/*/*.m
slice/*.m:
	Conform to the above change.

	Remove any dependencies on the sv{bimap,map,multi_map} modules.
2011-05-03 04:35:04 +00:00

23 lines
493 B
Mathematica

% This is a regression test. Some versions of the compiler fail it
% because of an improper implementation of comparison for floats.
:- module float_map.
:- interface.
:- import_module io.
:- pred main(io__state::di, io__state::uo) is det.
:- implementation.
:- import_module map, float.
main(S0, S) :-
map__init(M1),
map__det_insert(1.0, 5, M1, M2),
( map__search(M2, 14.5, _) ->
io__write_string("found it: bug\n", S0, S)
;
io__write_string("did not find it: ok\n", S0, S)
).