Commit Graph

2 Commits

Author SHA1 Message Date
Fergus Henderson
52767a5481 Update the test cases to reflect recent changes to io__write.
Estimated hours taken: 1

Update the test cases to reflect recent changes to io__write.

test/hard_coded/construct.m:
test/hard_coded/expand.m:
	Use `io__print' rather than `io__write' for univs,
	so that it doesn't output the `univ(... : type)' wrappers.

tests/hard_coded/deep_copy_bug.exp:
tests/hard_coded/construct.exp:
tests/hard_coded/expand.exp:
tests/hard_coded/write.exp:
tests/hard_coded/write_reg1.exp:
	Change the expected output to use proper list notation
	rather than prefix `.', and to properly quote strings and atoms,
	but also to improperly quote equivalences types.

tests/hard_coded/Mmake:
	Add a comment explaining that deep_copy_bug.exp, write.exp, and
	write_reg1.exp are wrong, due to a bug in io__write.
1997-04-28 15:52:30 +00:00
Tyson Dowd
39bdac4517 Add the type `type_info', which represents the type of a variable.
Estimated hours taken: 50

Add the type `type_info', which represents the type of a variable.
Implement functions and predicates to deal with type_infos, including
finding what functors they have, getting the arity and type_infos of their
the arguments of a functor, and constructing types.

compiler/base_type_layout.m:
	Document the constant used to represent the type 'void'.
	Make sure enumeration vectors are output in the same order for
	base_type_layouts and base_type_functors, so that we can
	refer to functors by the same functor number.

library/mercury_builtin.m:
	Add base_type_* for 'void'. 'void' is the type_info
	used for unbound type_variables.

library/std_util.m:
	Add
		function type_of/1
		function num_functors/1
		predicate get_functor/5
		function construct/3
	Use MR_DECLARE_STRUCT to declare base_type_* structs
	for handwritten code, so less code needs to be changed if this
	changes.
	Rename `mercury_expand_info' as `Mercury_Expand_Info' (C coding
	standard for typedefs).

runtime/type_info.h:
	Add a bunch of macros to deal with the various type information
	data structures. Eventually all the code that uses these data
	strcutures should use these macros.

tests/hard_coded/Mmake:
	Add `construct' to the test suite.

hard_coded/construct.m:
hard_coded/construct.exp:
	Test of type_of, num_functors, get_functor and construct.
1997-04-21 08:33:00 +00:00