Peter Wang 71edaf52e6 Fix problems with higher-order inst matching with polymorphic modes.
These changes allow the compiler to accept the contravariance_poly.m
test case that requires higher order pred insts to be contravariant in
the initial argument insts.  Previously the compiler would have rejected
it, if not for the hack that allows ground to match incomplete bound insts.

compiler/inst_match.m:
	pred_inst_argmodes_matches enabled the cs_reverse mode when
	matching initial insts, which causes handle_inst_var_subs to
	swap the insts for the inst var substitution calculation.
	The insts are swapped back for inst matching, but cs_reverse
	remained effective.  A recursive call to match two insts would
	swap the insts *again*, to the wrong order.  The fix is to
	invert cs_reverse to cs_forward when the insts are swapped back
	for matching.

	In pred_inst_argmodes_matches apply the incrementally calculated
	inst var substitution before matching.

compiler/modecheck_util.m:
	Make handle_implied_mode use inst_matches_initial_no_implied_modes_sub.
	The non-sub variant does not compute inst var substitutions and
	fails where the higher-order argument inst has an inst variable
	(as in contravariance_poly.m), then handle_implied_mode
	incorrectly deduces that the call is to an implied mode.
2014-10-10 16:13:35 +11:00
2014-09-29 09:47:49 +10:00
2014-09-29 17:22:17 +10:00
2014-08-30 00:48:53 +02:00
2014-06-16 15:08:05 +10:00
2014-07-14 14:54:40 +10:00
2014-05-28 12:39:42 +10:00

Mercury

Mercury is a logic/functional programming language which combines the clarity and the expressiveness of declarative programming with advanced static analysis and error detection features.

More information is available on the website's about pages, in other README files in the source code repository, and in the documentation.

README files

The Mercury compiler has a number of different backends and works on different operating systems. Specific information is contained in individual README files:

Other information

See the current release notes for the latest stable release. The history file is relevant if you want to find out more about the past development of Mercury. News lists any current or future enhancements (but this isn't always up-to-date). The limitations file lists a number of ways in which the Mercury implementation does not yet meet its goals.

Information for developers

If you are considering contributing to the Mercury project the website contains that may be helpful. These include a document about contributions in general and specific information about contributing such as coding styles.

Contact

See our contact page.

Description
No description provided
Readme MIT 248 MiB
Languages
Mercury 85.3%
C 8.7%
Shell 1.4%
Makefile 1%
JavaScript 1%
Other 2.1%