Files
mercury/library/require.m
Fergus Henderson fd2470dd0a Add some more stuff for compiling to .o
Makefile*:
	Add some more stuff for compiling to .o

Makefile*, mercury_compile*, code_gen*:
	Add some stuff for handling `.pp' files.
	`.pp' files are Mercury source code containing
	NU-Prolog hacks inside

		#if NU_PROLOG
		...
		#endif

	These hacks are preprocessed out (using sed, not cpp)
	except when compiling with `mnc'.

term_io.nl, term_io.nu.nl, interpreter.nl, prog_out.nl:
	Make sure all the predicates in term_io.nl are
	prefixed with `term_io__', not `io__'.

term_io.nl, require.nl:
	Add some `external' declarations.

call_gen.nl, unify_gen.nl:
	A temporary hack - generate incorrect code for complicated/polymorphic
	unifications, rather than aborting.

random.nl:
	Make the code more efficient.

hlds.nl, term.nl:
	Allocate pred_ids and variable numbers randomly rather than
	sequentially, so that the binary trees remain reasonably balanced.

code_info.nl, unify_gen.nl, hlds_out.nl:
	Generate informative comments for tag tests: say the name of
	the variable being tested, and which constructor we are testing for.

llds.nl:
	Cast field() expressions to (int) when used as rvals, so
	that comparisons work as expected.

make_hlds.nl:
	Improve error reporting.
1994-10-09 18:26:41 +00:00

34 lines
631 B
Mathematica

%-----------------------------------------------------------------------------%
:- module require.
% Main author: fjh.
% This module provides features similar to <assert.h> in C.
%-----------------------------------------------------------------------------%
:- interface.
/***
:- pred require(pred, string).
:- mode require(in, in).
% require(Goal, Message).
% Call goal, and abort with error message if Goal fails.
****/
:- pred error(string).
:- mode error(in) is erroneous.
% error(Message).
% Abort with error message.
:- implementation.
/*
:- external(require/2).
*/
:- external(error/1).
:- end_module require.