Commit Graph

35 Commits

Author SHA1 Message Date
Zoltan Somogyi
9b6390b17e Bring the programming style of extras up to date.
extras/curs/curs.m:
extras/curs/curs.panel.m:
    Make panel a separate submodule of curs, not a nested submodule.

extras/base64/base64.m:
extras/curses/mcurses.basics.m:
extras/curses/mcurses.m:
extras/curses/mcurses.misc.m:
extras/curses/mcurses.user.m:
extras/gator/evolve.m:
extras/gator/genotype.m:
extras/gator/phenotype.m:
extras/gator/tausworthe3.m:
extras/monte/dots.m:
extras/monte/geom.m:
extras/monte/hg.m:
extras/monte/monte.m:
extras/monte/rnd.m:
extras/moose/grammar.m:
extras/moose/moose.m:
extras/mopenssl/mopenssl.m:
extras/net/echo.m:
extras/net/errno.m:
extras/net/getaddrinfo.m:
extras/net/net.m:
extras/net/netdb.m:
extras/net/sockets.m:
extras/net/streams.m:
extras/net/tcp.m:
extras/net/test_lookups.m:
extras/net/types.m:
extras/odbc/odbc.m:
extras/odbc/odbc_test.m:
extras/references/README:
extras/references/reference.m:
extras/references/scoped_update.m:
extras/solver_types/library/any.m:
extras/solver_types/library/any_array.m:
extras/solver_types/library/any_assoc_list.m:
extras/solver_types/library/any_list.m:
extras/solver_types/library/any_map.m:
extras/solver_types/library/any_tree234.m:
extras/solver_types/library/any_util.m:
extras/trail/trail.m:
extras/trailed_update/samples/interpreter.m:
extras/trailed_update/samples/vqueens.m:
extras/trailed_update/tests/var_test.m:
extras/trailed_update/tr_array.m:
extras/trailed_update/tr_store.m:
extras/trailed_update/trailed_update.m:
extras/trailed_update/unsafe.m:
extras/trailed_update/var.m:
    Bring programming style up to date.
2023-03-30 21:48:10 +11:00
Mark Brown
d465fa53cb Update the COPYING.LIB file and references to it.
Discussion of these changes can be found on the Mercury developers
mailing list archives from June 2018.

COPYING.LIB:
    Add a special linking exception to the LGPL.

*:
    Update references to COPYING.LIB.

    Clean up some minor errors that have accumulated in copyright
    messages.
2018-06-09 17:43:12 +10:00
Julien Fischer
4eec5c498d Fix an error in extras/trailed_update.
extras/trailed_update/var.m:
   Delete determinisms on pred declarations with separate
   mode declarations.  The compiler now reports an error for
   these.
2016-02-13 14:46:38 +11:00
Julien Fischer
128bf7f630 Fix extras/trailed_update/samples/vqueens.m.
extras/trailed_update/samples/vqueens.m:
	Use higher-order any insts to avoid the mode error in this module.

extras/trailed_update/var.m:
	Add extras modes to the freeze predicates that take closures with inst
	any.  (XXX This module could do with a re-write since Mercury now
	implements many of the features that had to be hacked around when
	it was written.)
2014-02-06 03:55:00 +11:00
Julien Fischer
6f5974088e Use a local foreign_decl pragma to declare a non-exported function.
extras/trailed_update/var.m:
	Use a local foreign_decl pragma to declare a non-exported function.
2010-12-19 07:23:20 +00:00
Julien Fischer
0d22a819d9 Fix bitrot in extras/trailed_update.
Branches: main

Fix bitrot in extras/trailed_update.

extras/trailed_updated/var.m:
	Don't specify an initialisation predicated for the solver type var/1.

extras/trailed_updated/samples/interpreter.m:
	Conform with the change that added an extra argument to the variable/2
	constructor of the standard library type term/1.

extras/trailed_update/tests/var_test.m:
	Use up-to-date syntax for modes.

extras/trailed_update/Mmakefile:
extras/trailed_update/samples/Mmakefile:
extras/trailed_update/tests/var_test.m:
	Use trail segments since that's what you get in an installation by
	default.

extras/trailed_update/*.m:
	Update syntax and formatting to conform more closely to our
	current coding standards.

	Add require_feature_set pragmas for trailing.
2010-12-16 15:12:02 +00:00
Julien Fischer
64b6c216dc Remove support for the reserve tag (.rt) grades.
Estimated hours taken: 1
Branches: main

Remove support for the reserve tag (.rt) grades.
These were only ever needed to support the implementation of Herbrand
variables in (older versions of) HAL.

NOTE: this change removes the .rt grade, the undocumented
reserve_tag pragma is unchanged.

runtime/mercury_grade.h:
	Do not handle the .rt component.  Rather than renumbering the
	grade parts here I have documented that grade part 8 (formerly .rt)
	is unused.

runtime/mercury_tags.h:
runtime/mercury_type_info.h:
runtime/mercury_conf_param.h:
	Conform to the above change.

compiler/compile_target_code.m:
compiler/handle_options.m:
compiler/options.m:
compiler/make_tags.m:
compiler/prog_type.m:
	Remove the `--reserve-tag' option and modify any code
	that relied upon it.  Such code is largely unchanged
	since it is still required for the implementation of the
	reserve_tag pragma.

doc/user_guide.texi:
	Delete documentation for `--reserve-tag'.

scripts/canonical_grade.sh-subr:
scripts/init_grade_otpions.sh-subr:
scripts/mgnuc.in:
scripts/parse_grade_options.sh-subr:
	Remove support for the `.rt' grade component.

NEWS:
	Announce that .rt grades are no longer supported.

extras/trailed_update/var.m:
extras/trailed_update/samples/Mmakefile:
extras/trailed_update/tests/Mmakefile:
	Update some documentation.

tests/debugger/Mmakefile:
tests/tabling/Mmakefile:
	Delete special handling for .rt grades.
2007-07-31 07:59:23 +00:00
Julien Fischer
553fb3f7d9 Use pragma foreign_export' in preference to pragma export' throughout
Estimated hours taken: 1
Branches: main

Use `pragma foreign_export' in preference to `pragma export' throughout
the Mercury distribution.

Convert more of the extras distribution to four-space indentation and
other minor cleanups.

browser/*.m:
library/*.m:
samples/*:
extras/*:
	As above.
2006-08-31 11:09:54 +00:00
Julien Fischer
77b6dabff6 Delete an incorrect promise_pure attribute.
extras/trailed_update/var.m:
	Delete an incorrect promise_pure attribute.
2006-07-28 05:33:42 +00:00
Julien Fischer
34cc756c73 Fix compilation of extras/trailed_update.
Estimated hours taken: 0.1
Branches: main, release

Fix compilation of extras/trailed_update.

extras/trailed_update/var.m:
	Add missing promise_pure scopes.

extras/trailed_update/samples/interpreter.m:
	Conform to recent changes in the standard library.
2006-04-21 04:12:21 +00:00
Julien Fischer
9fb4f15dfc Fix compilation problems in the extras distribution caused by recent
Estimated hours taken: 0.5
Branches: main

Fix compilation problems in the extras distribution caused by recent
changes.

extras/stream/stream.m:
	Provide a definition for the type stream/1.

extras/*/*.m:
	Conform to the recent changes to the standard library.
2006-03-30 01:21:20 +00:00
Julien Fischer
03f647d82b Use more recent syntax and make these modules
Estimated hours taken: 2.5
Branches: main, release

extras/trailed_update/tr_array.m:
extras/trailed_update/tr_store.m:
extras/trailed_update/var.m:
extras/trailed_update/unsafe.m:
extras/trailed_update/samples/vqueens.m:
	Use more recent syntax and make these modules
	conform more closely to our coding standard.

	Use the new foreign language interface.

	Replace deprecated mode and inst syntax.

extras/trailed_update/samples/interpreter.m:
extras/trailed_update/samples/interpreter.exp:
	s/mutvar/generic_mutvar/
2005-03-01 13:29:04 +00:00
Ralph Becket
4b333781fe Change mutvar and ref to generic_mutvar and generic_ref
Estimated hours taken: 0.25
Branches: main, version-0_12-branch

extras/trailed_update/tr_store.m:
	Change mutvar and ref to generic_mutvar and generic_ref
	throughout.

extras/trailed_update/var.m:
	Change the definition of var/1 to use the new solver types
	interface.
2005-03-01 05:58:13 +00:00
David Overton
2ad2f0a28e Allow types to be declared as "solver" types using the syntax
Estimated hours taken: 120
Branches: main

Allow types to be declared as "solver" types using the syntax
`:- solver type ...'.

For a non-solver type t (i.e. any type declared without using the
`solver' keyword), the inst `any' should be considered to be equivalent
to a bound inst i where i contains all the functors of the type t and
each argument has inst `any'.  For solver types, `any' retains its
previous meaning.

This is required to allow us to represent HAL's `old' inst using `any'.
In HAL, `old' is like `any' if the type is an instance of a particular
type class (`solver/1').  However, for types that are not instances of
`solver/1', `old' needs to be treated as though it is `bound'.

library/ops.m:
	Add `solver' as a unary prefix operator.

compiler/prog_data.m:
	Add a field to the type `type_defn' to record whether or not the
	type is a solver type.

compiler/hlds_data.m:
	Add an equivalent field to the type `hlds_type_body'.

compiler/prog_io.m:
compiler/make_hlds.m:
compiler/modules.m:
compiler/mercury_to_mercury.m:
compiler/hlds_out.m:
	Handle the new ":- solver type ..." syntax.

compiler/det_report.m:
compiler/equiv_type.m:
compiler/foreign.m:
compiler/hlds_code_util.m:
compiler/hlds_out.m:
compiler/intermod.m:
compiler/magic_util.m:
compiler/ml_code_gen.m:
compiler/ml_type_gen.m:
compiler/ml_unify_gen.m:
compiler/mlds.m:
compiler/module_qual.m:
compiler/post_typecheck.m:
compiler/pragma_c_gen.m:
compiler/recompilation.check.m:
compiler/recompilation.usage.m:
compiler/recompilation.version.m:
compiler/special_pred.m:
compiler/stack_opt.m:
compiler/switch_util.m:
compiler/table_gen.m:
compiler/term_util.m:
compiler/type_ctor_info.m:
compiler/unify_gen.m:
compiler/unify_proc.m:
	Handle the changes to `type_defn' and `hlds_type_body'.

compiler/type_util.m:
	Add predicates `type_util__is_solver_type' and
	`type_body_is_solver_type'.

compiler/inst_match.m:
compiler/inst_util.m:
	In inst_matches_{initial,final,binding} and
	abstractly_unify_inst_functor, when we are comparing `any' insts, check
	whether or not the type is a solver type and treat it appropriately.

compiler/instmap.m:
compiler/modecheck_unify.m:
	Pass type information to abstractly_unify_inst_functor.

compiler/mode_util.m:
	Add a predicate `constructors_to_bound_any_insts' which is the same as
	`constructors_to_bound_insts' except that it makes the arguments of the
	bound inst `any' instead of `ground'.

tests/invalid/any_mode.m:
tests/invalid/any_mode.err_exp:
tests/hard_coded/any_free_unify.m:
	Modify these test cases to use a "solver" type instead of `int'.

tests/valid/any_matches_bound.m:
tests/valid/Mmakefile:
tests/invalid/Mmakefile:
tests/invalid/any_should_not_match_bound.m:
tests/invalid/any_should_not_match_bound.err_exp:
	Add new test cases.

extras/trailed_update/var.m:
clpr/cfloat.m:
	Modify to use the new `:- solver type' syntax.
2003-07-25 02:27:37 +00:00
Fergus Henderson
49f9b067fa Fix some problems with the trailed_update tests.
Branches: main
Estimated hours taken: 4

Fix some problems with the trailed_update tests.

extras/trailed_update/var.m:
	Document that this module doesn't work in `.rt' grades (and why).

extras/trailed_update/samples/Mmakefile:
	Disable the vqueens test in `.rt' grades.
	Also, enable the interpreter test, since the reason for disabling
	it is no longer valid now that the value numbering pass has been
	deleted.  But disable it for `.rt' grades, since it turns out
	to fail for those.
	Also, use $(DIFF_OPTS) rather than hard-coding "-c".

extras/trailed_update/samples/interpreter.exp:
	Update to reflect the current output,
	which has different variable numbers than the original output.
	(The output also changed slightly when interpreter.m was changed
	to use store__new rather than store__init.)
2002-11-07 06:19:09 +00:00
Fergus Henderson
3366df8011 Fix a portability problem that broke the trailed_update tests with lcc.
Estimated hours taken: 0.1
Branches: main

Fix a portability problem that broke the trailed_update tests with lcc.

extras/trailed_update/var.m:
	Use "\\n" rather than "\n" for newlines in string literals
	that occur inside pragma c_code.
2002-10-27 13:46:54 +00:00
Simon Taylor
b7c4a317e9 Add MR_ prefixes to the remaining non-prefixed symbols.
Estimated hours taken: 4
Branches: main

Add MR_ prefixes to the remaining non-prefixed symbols.

This change will require all workspaces to be updated
The compiler will start generating references to MR_TRUE,
MR_bool, etc., which are not defined in the old runtime
header files.

runtime/mercury_std.h:
	Add MR_ prefixes to bool, TRUE, FALSE, max, min,
	streq, strdiff, strtest, strntest, strneq, strndiff,
	strntest, NO_RETURN.

	Delete a commented out definition of `reg'.

runtime/mercury_tags.h:
	Add an MR_ prefix to TAGBITS.

configure.in:
runtime/mercury_goto.h:
runtime/machdeps/i386_regs.h/mercury_goto.h:
	Add an MR_ prefix to PIC.

runtime/mercury_conf_param.h:
	Allow non-prefixed PIC and HIGHTAGS to be defined on
	the command line.

runtime/mercury_bootstrap.h:
	Add backwards compatibility definitions.

RESERVED_MACRO_NAMES:
	Remove the renamed macros.

compiler/export.m:
compiler/ml_code_gen.m:
	Use MR_bool rather than MR_Bool (MR_Bool is
	meant to be for references to the Mercury type
	bool__bool).

runtime/mercury_types.h:
	Add a comment the MR_Bool is for references to
	bool__bool.

*/*.c:
*/*.h:
*/*.m:
	Add MR_ prefixes.
2002-02-18 07:01:33 +00:00
Fergus Henderson
e07e1cd1da Implement trailing for the MLDS back-end.
Estimated hours taken: 16

Implement trailing for the MLDS back-end.

library/private_builtin.m:
	Define impure Mercury procedures corresponding to the
	trailing operations in runtime/mercury_trail.h.

compiler/add_trail_ops.m:
	A new HLDS->HLDS pass.
	This implements trailing by inserting calls to the
	trailing primitives declared in library/private_builtin.m.

compiler/notes/compiler_design.html:
	Document the new pass.

compiler/mercury_compile.m:
	Change the code for mercury_compile__mlds_backend so that
	if trailing is enabled, it invokes the new add_trail_ops pass.

runtime/mercury_wrapper.c:
	For high-level C grades, call MR_init_memory() (which sets up
	the redzone signal handlers, etc.) and if trailing is enabled,
	initialize the trail.

library/benchmarking.m:
	Change the code in report_stats for printing out the size of
	the trail so that it gets the trail zone from MR_trail_zone
	rather than via the MercuryEngine, so that it works in
	high-level C grades (which don't have any MercuryEngine).

extras/trailed_update/tr_array.m:
extras/trailed_update/var.m:
	Add missing `#includes' to make these files work with the
	MLDS back-end.
2000-12-13 12:13:09 +00:00
Fergus Henderson
f9f4a62d3a Add some missing `MR_' prefixes.
Estimated hours taken: 0.75

extras/clpr/cfloat.m:
extras/clpr/dump.m:
extras/trailed_update/tr_array.m:
extras/trailed_update/tr_store.m:
extras/trailed_update/var.m:
	Add some missing `MR_' prefixes.
2000-12-07 13:16:58 +00:00
Fergus Henderson
6ba459bdaa Add some `MR_' prefixes.
Estimated hours taken: 0.75

Add some `MR_' prefixes.

runtime/mercury_string.h:
runtime/mercury_misc.h:
runtime/mercury_misc.c:
runtime/mercury_make_type_info_body.h:
runtime/mercury_type_info.c:
runtime/mercury.c:
extras/*/*.m:
extras/*/*/*.m:
library/*.m:
trace/*.c:
compiler/fact_table.m:
compiler/ml_code_gen.m:
compiler/stack_layout.m:
	Add `MR_' prefixes to fatal_error(), hash_string(),
	do_hash_string, and HASH_STRING_FUNC_BODY.

runtime/mercury_bootstrap.h:
	Add backwards compatibility macros for
	fatal_error() and hash_string().
2000-05-08 13:48:50 +00:00
Fergus Henderson
46db3d469a Declare the impure predicates debug_pred/3 and debug_pred2/4
Estimated hours taken: 0.5

extras/trailed_update/var.m:
	Declare the impure predicates debug_pred/3 and debug_pred2/4
	as pure, rather than impure.  This is necessary because we use
	these predicates as arguments to the higher-order predicate
	freeze/3, and currently Mercury doesn't support impure
	closures.
2000-04-24 11:06:18 +00:00
Fergus Henderson
2f80ccd109 Update various files to reflect recent name changes.
Estimated hours taken: 0.5

Update various files to reflect recent name changes.

extras/trailed_update/var.m:
tests/hard_coded/existential_types_test.m:
tests/debugger/existential_type_classes.m:
	Add missing `MR_' prefixes.
1999-10-28 16:29:20 +00:00
Zoltan Somogyi
466c844964 Make the retry command work in trailing grades (e.g. for HAL).
Estimated hours taken: 18

Make the retry command work in trailing grades (e.g. for HAL).

compiler/trace.m:
	In trailing grades, reserve two stack slots to hold (a) the trail
	pointer on entry, and (b) a new ticket obtained on entry. Arrange to
	put the numbers of these stack slots in the proc layout.

compiler/stack_layout.m:
	Put the number of the first of these stack slots in the proc layout.

compiler/code_info.m:
	Arrange the default: there are no such slots if debugging is not
	enabled.

compiler/code_gen.m:
	Insert code to discard the allocated ticket, in the success epilog
	of model_det procedures, the success and failure epilogs of model_semi
	procedures, and the failure epilogs of model_non procedures.
	(Model_det procedures don't have failure epilogs, and discarding
	the ticket in the success epilog of a model_non procedure would be
	premature.)

compiler/llds.m:
	Add two new alternatives to the type describing stack slots:
	a stack slot may contain a trail pointer or a ticket.

	Add a new reason for resetting the trail: a retry in the debugger.

compiler/llds_out.m:
	Minor changes to conform to llds.m, and to make diagnostic output
	less misleading.

library/builtin.m:
	Add the type_ctor_info for the new "types" describing stored trail
	pointers and tickets.

	Bring up to date the type_ctor_infos of other "types" used only
	for describing stack slots.

library/std_util.m:
	Add the missing code to handle the type_ctor_infos of trail pointers,
	tickets and other "types" used only for describing stack slots.

runtime/mercury_type_info.h:
	Add a new type_ctor representation value for stored trail pointers,
	tickets, and for other "types" used only for describing stack slots.

runtime/mercury_deep_copy_body.h:
runtime/mercury_tabling.c:
	Add the missing code to handle the type_ctor_infos of trail pointers,
	tickets and other "types" used only for describing stack slots.

runtime/mercury_stack_layout.h:
	Add a field to proc layouts to hold either the number of the first
	of the two stack slots holding trail info, or -1.

runtime/mercury_trail.h:
	Add the new reason why the trail may be reset.

trace/mercury_trace.c:
	In trailing grades, reset the trail, with the reason being given
	as retry, when the debugger's retry command is executed.

extras/references/scoped_update.m:
extras/trailed_update/var.m:
clpr/cfloat.m:
extras/trailed_update/tests/func_trail_test.m:
extras/trailed_update/tests/func_trail_test_2.m:
	Handle MR_retry as a reason for unwinding the trail.
1999-10-08 02:56:24 +00:00
Fergus Henderson
bf979cf38f Fix some "missing interface import" bugs detected by the
Estimated hours taken: 0.5

profiler/call_graph.m:
profiler/read.m:
extras/trailed_update/var.m:
	Fix some "missing interface import" bugs detected by the
	latest version of the compiler.
1998-03-04 19:59:56 +00:00
Fergus Henderson
c5f6bfa162 Document that the interface to freeze/{2,3} is not stable.
Estimated hours taken: 0.25

extras/trailed_update/var.m:
	Document that the interface to freeze/{2,3} is not stable.
1998-02-15 21:48:28 +00:00
Fergus Henderson
ee8ac8ac11 Avoid mode errors in debug_freeze/{3,4} which were caused by the use
Estimated hours taken: 1

extras/trailed_update/var.m:
	Avoid mode errors in debug_freeze/{3,4} which were caused by the use
	of a variable of inst `any' as the curried argument in a higher-order
	term.  The fix was to replace `unsafe_perform_io(dump_var(Var))'
	with `unsafe_dump_var(Var)' where unsafe_dump_var/1 is a new impure
	version of dump_var/3.
	(The mode errors were detected as a result of Andrew Bromage's
	recent change to fix mode checking for lambda expressions.
	In this particular case, as it happens, there is no genuine error,
	becaused dump_var/1 does not instantiate its argument.
	However, there's no way for the mode checker to know that,
	so it is correct to report an error.)
1998-02-14 15:06:41 +00:00
Fergus Henderson
5041f01094 Make use of impure' and semipure' declarations.
Estimated hours taken: 0.75

extras/trailed_update/var.m:
extras/trailed_update/unsafe.m:
	Make use of `impure' and `semipure' declarations.
1997-12-11 21:23:32 +00:00
Fergus Henderson
4a9e2ae3bb Add new predicate var__is_ground/2.
Estimated hours taken: 2

extras/trailed_update/var.m:
	Add new predicate var__is_ground/2.
	Also fix a bug: it was not handling unifications between
	already-aliased variables correctly.

extras/trailed_update/samples/tests.m:
extras/trailed_update/samples/tests.exp:
extras/trailed_update/samples/tests.out:
	Add some more test cases.
1997-11-13 17:14:58 +00:00
Fergus Henderson
b7be1dc8d2 Fix a bug (I had changed a function name in but forgotten
Estimated hours taken: 1

extras/trailed_update/var.m:
	Fix a bug (I had changed a function name in but forgotten
	to change the caller).

extras/trailed_update/Mmakefile:
	Add `-Werror' to MGNUCFLAGS, to prevent reoccurrence of bugs
	like the one above.
	Fix the rule for `mmake depend' so that it makes the
	dependencies in the `samples' subdirectory too.

tools/test_mercury:
	Test the trailed_update library.
1997-11-11 10:26:00 +00:00
Fergus Henderson
541d1167ce Dectect floundering in solutions/2 and nondet if-then-else.
Estimated hours taken: 4

Dectect floundering in solutions/2 and nondet if-then-else.

library/std_util.m:
	Change the code for builtin_aggregate to (a) check for
	floundering and (b) reset the trail properly.

compiler/code_gen.m:
	Change the code for if-then-elses with nondet conditions
	so that it checks for floundering.

runtime/mercury_trail.h:
compiler/llds.m:
compiler/llds_out.m:
	Add new alternative `MR_solve' to MR_untrail_reason.
	This is used to for checking for floundering in the
	above-mentioned two cases.

extras/clpr/cfloat.m:
extras/trailed_update/var.m:
	Handle the MR_solve case.

doc/reference_manual.texi:
	Document MR_solve.

NEWS:
	Delete the mention of the limitation that we didn't
	dectect floundering in solutions/2 and nondet if-then-else.
1997-10-12 13:32:58 +00:00
Fergus Henderson
1bf14a0872 Fix a bug in the code for detecting floundering.
Estimated hours taken: 3

extras/trailed_update/var.m:
	Fix a bug in the code for detecting floundering.
	Improve the error message for floundering slightly
	(print out how many floundered goals there are).

extras/trailed_update/Mmakefile:
	Add an `mmake check' target.

extras/trailed_update/samples/tests.exp:
	Update the expected test output to reflect the new
	floundering error message.
1997-10-07 11:48:04 +00:00
Fergus Henderson
aa985ccb0a Various bug fixes and enhancements to var.m and other stuff in
Estimated hours taken: 6

Various bug fixes and enhancements to var.m and other stuff in
extras/trailed_update.

extras/trailed_update/var.m:
	Add code to detect floundering.
	Change the code for debug_freeze/3 to avoid a floundering warning.
	Add new predicates debug_freeze/4 (to go with debug_freeze/3)
	and dump_var/3.
	Fix a bug in freeze/3 (higher-order terms are monomorphic, so
	there is no need to explicitly pass type-infos when calling them).
	Fix a bug in wakeup_delayed_goals/2 (we need to set the binding
	to ground _before_ waking up the goals).

extras/trailed_update/Mmakefile:
	Add `ML = ml --mercury-libs shared', so that it will work on Linux.

extras/trailed_update/samples/Mmakefile:
	Make it work with shared libraries on Linux.

extras/trailed_update/samples/tests.m:
extras/trailed_update/samples/tests.exp:
	Some test cases for var.m.

extras/trailed_update/tr_store.m:
	Add a prototype for ML_compare_typeinfo().

extras/trailed_update/unsafe.m:
	Change the C code for unsafe_perform_io to match the new
	interface for exported Mercury procedures that do I/O --
	there is no longer any need to pass dummy io__state arguments
	in the C code.
1997-10-06 18:46:58 +00:00
Fergus Henderson
11966a2003 Fix a bug: some of the code relied on there always being at least one
Estimated hours taken: 0.5

extras/trailed_update/var.m:
	Fix a bug: some of the code relied on there always being at least one
	level of indirection (i.e. assumed that the top-level functor of a
	variable representation was always alias/1), but the code to
	initialize a variable with a ground value did not satisfy this
	invariant.
	Also change the top-level functor from var_rep/1 to '$VAR'/1,
	for cosmetic reasons.
1997-09-27 18:19:27 +00:00
Fergus Henderson
536e808394 Delete some old code that is no longer necessary;
Estimated hours taken: 0.25

extras/trailed_update/var.m:
	Delete some old code that is no longer necessary;
	the code in question has now migrated to the Mercury
	runtime directory.
1997-09-27 14:54:19 +00:00
Fergus Henderson
9a746997e2 New module, containing support for Prolog-style variables
Estimated hours taken: 16

extras/trailed_update/var.m:
	New module, containing support for Prolog-style variables
	and coroutining with freeze/2 and freeze/3.

extras/trailed_update/unsafe.m:
	New module, containing unsafe_perform_io.

extras/trailed_update/trailed_update.m:
	Add reference to var.m.
1997-09-20 17:15:22 +00:00