Commit Graph

23 Commits

Author SHA1 Message Date
Julien Fischer
e0f5ac47db Make it easier for vi to jump past the initial comments
Estimated hours taken: 0.1
Branches: main

library/*.m:
	Make it easier for vi to jump past the initial comments
	at the head of a module.
2006-04-19 05:18:00 +00:00
Julien Fischer
459847a064 Move the univ, maybe, pair and unit types from std_util into their own
Estimated hours taken: 18
Branches: main

Move the univ, maybe, pair and unit types from std_util into their own
modules.  std_util still contains the general purpose higher-order programming
constructs.

library/std_util.m:
	Move univ, maybe, pair and unit (plus any other related types
	and procedures) into their own modules.

library/maybe.m:
	New module.  This contains the maybe and maybe_error types and
	the associated procedures.

library/pair.m:
	New module.  This contains the pair type and associated procedures.

library/unit.m:
	New module. This contains the types unit/0 and unit/1.

library/univ.m:
	New module. This contains the univ type and associated procedures.

library/library.m:
	Add the new modules.

library/private_builtin.m:
	Update the declaration of the type_ctor_info struct for univ.

runtime/mercury.h:
	Update the declaration for the type_ctor_info struct for univ.

runtime/mercury_mcpp.h:
runtime/mercury_hlc_types.h:
	Update the definition of MR_Univ.

runtime/mercury_init.h:
	Fix a comment: ML_type_name is now exported from type_desc.m.

compiler/mlds_to_il.m:
	Update the the name of the module that defines univs (which are
	handled specially by the il code generator.)

library/*.m:
compiler/*.m:
browser/*.m:
mdbcomp/*.m:
profiler/*.m:
deep_profiler/*.m:
	Conform to the above changes.  Import the new modules where they
	are needed; don't import std_util where it isn't needed.

	Fix formatting in lots of modules.  Delete duplicate module
	imports.

tests/*:
	Update the test suite to confrom to the above changes.
2006-03-29 08:09:58 +00:00
Zoltan Somogyi
b6b4647055 Add a function for use by the scanner generator.
Estimated hours taken: 0.5
Branches: main

library/eqvclass.m:
	Add a function for use by the scanner generator.

library/multi_map.m:
	Fix typo in comment.

NEWS:
	Mention the new function.
2006-03-13 04:00:13 +00:00
Zoltan Somogyi
b293bd999d Replace __ with . as the module qualifier everywhere.
Estimated hours taken: 1
Branches: main

library/*.m:
	Replace __ with . as the module qualifier everywhere.

tests/hard_coded/test_injection.exp:
	Replace __ with . as the module qualifier in expected exceptions.
2006-03-07 22:23:58 +00:00
Zoltan Somogyi
57b8f436eb Convert to four-space indentation most of the library modules that
Estimated hours taken: 4
Branches: main

library/*.m:
	Convert to four-space indentation most of the library modules that
	weren't already indented that way. Use predmode syntax where possible.
	In some modules, shorten long lines by deleting module name prefixes.
	Fix departures from our coding standards.

	In some modules, simplify code, mostly using field names and/or state
	variables.

	There are no changes in algorithms, except for neg_list in integer.m.
2005-10-17 11:35:22 +00:00
Zoltan Somogyi
88c7539230 Import only one module per line, as we already do in the compiler
Estimated hours taken: 0.3
Branches: main

library/*.m:
	Import only one module per line, as we already do in the compiler
	directory.
2005-06-16 04:08:07 +00:00
Julien Fischer
1532b7b0c1 Add a module with versions of the multi_map predicates
Estimated hours taken: 0.5
Branches: main, release

library/svmulti_map.m:
	Add a module with versions of the multi_map predicates
	that are conducive to the use of state variables.

library/multi_map.m:
	Fix up some minor problems with the documentation.

library/library.m:
NEWS:
	Mention the above addition.
2005-02-24 14:11:14 +00:00
Ralph Becket
d0bd460b8f Minor reformatting; added some renamed preds and funcs to improve
Estimated hours taken: 3
Branches: main, version-0_12-branch

library/array.m:
library/array2d.m:
library/assoc_list.m:
library/bag.m:
library/benchmarking.m:
library/bimap.m:
library/bintree_set.m:
library/bitmap.m:
library/bool.m:
library/builtin.m:
library/cord.m:
library/float.m:
library/graph.m:
library/group.m:
library/hash_table.m:
library/int.m:
library/lexer.m:
library/list.m:
library/map.m:
library/math.m:
library/multi_map.m:
library/ops.m:
library/parser.m:
library/rbtree.m:
library/set.m:
library/stack.m:
library/store.m:
library/string.m:
library/time.m:
	Minor reformatting; added some renamed preds and funcs to improve
	consistency of naming in the library; removed some preds and types that
	have been marked obsolete since 0.11.
2005-02-02 04:28:50 +00:00
Julien Fischer
d7022448f6 Fix some documentation in the multi_map module.
Estimated hours taken: 0.2
Branches: main

Fix some documentation in the multi_map module.

library/multi_map.m:
	Fix the documentation for multi_map.merge which was incomplete.

	s/implemention/implementation.
2005-01-27 03:45:24 +00:00
Julien Fischer
b13a50c7f6 Make the positioning of descriptive comments conform
Estimated hours taken: 3.5
Branches: main

Make the positioning of descriptive comments conform
to the coding standard for the following library modules.

Convert preds to predmode syntax where possible.

Make the ordering of related predicates and functions
conform to the coding standard, where the descriptive
comment makes it possible to do that.

Other minor changes are listed below.

library/bimap.m:
	Fix capitalisation of a few comments.

library/dir.m:
	s/throw an exception/throws an exception/.

library/exception.m:
	Fix the comment about the exception_result/1 type.
	There is only one type and an inst following the comment.

library/map.m:
	Remove the unique modes for map.set/4, map.delete/3 and
	map.delete_list/3.

library/rbtree.m:
	Remove the unique modes for rbtree.set/4, rbtree.delete/3,
	rbtree.remove/4, rbtree.remove_smallest/4 and rbtree.remove_largest/4.

library/tree234.m:
	Remove left over unique modes for preds.

library/set.m:
	XXX the ordering of procedures in this module is a bit strange.
library/set_bbbtree.m:
library/set_unordlist.m:
	Remove various unique modes for set operations like
	delete/3.  (Some of these were commented out anyway).

library/term_to_xml.m:
	Fix a spot where line width exceeded 79 characters.

library/array.m:
library/assoc_list.m:
library/random.m:
library/multi_map.m:
library/pqueue.m:
library/queue.m:
library/bool.m:
library/char.m:
library/construct.m:
library/counter.m:
library/deconstruct.m:
library/eqvclass.m:
library/gc.m:
library/io.m:
library/sparse_bitset.m:
library/stack.m:
library/std_util.m:
library/store.m:
library/string.m:
library/term.m:
library/term_io.m:
library/type_desc.m:
library/varset.m:
	As above.
2005-01-24 23:16:40 +00:00
Zoltan Somogyi
34011f5e75 Reduce the size of compiler-generated C source files even further.
Estimated hours taken: 8
Branches: main

Reduce the size of compiler-generated C source files even further. The
reduction is 3 to 6% in non-debug LLDS grades, but 25 to 35% in debug grades.
Together with my previous change, the size of parse_tree.modules.c has gone
from more than 25 Mb to less than 8 Mb.

The changes to the header files will be committed first, followed some days
later by the changes to the compiler to generate the new macros. This gives
time for people to "cvs update" their workspaces at their own pace before
a change in the installed compiler forces them to do so.

compiler/llds_out.m:
	Group the declarations of common_data structures, so that a single
	mention of the type name can be amortized over the declaration of many
	structures.

	Do not emit macro invocations needed only by time profiling unless
	we are doing time profiling.

	When emitting rvals, look for special cases in which we can emit
	shorter code: references to common_data structures and to
	type_ctor_info structures. Both occur a lot in the data structures
	the compiler generates in debugging grades.

	Record which type names have been declared, so we don't declare them
	twice.

	Convert some affected predicates to state variable syntax.

compiler/layout_out.m:
	When possible, emit a shorthand macro that declares a label as it
	defines its label layout structure.

compiler/rtti_out.m:
	Group the declarations of rtti data structures, so that a single
	mention of the type name can be amortized over the declaration of many
	structures.

compiler/llds.m:
	Put common_data structures into a separate type, to allow them to be
	manipulated independently.

	Add a helper predicate.

compiler/global_data.m:
	Conform to the changed types in llds.m.

compiler/name_mangle.m:
	Add some helper predicates for use in llds_out.m and rtti_out.m.

	Reorder some predicate definitions for consistency with their
	declarations.

compiler/rtti.m:
	Add a helper predicate.

compiler/trace.m:
	Instead of generating long canned code fragments, generate calls to
	macros that expand to those canned code fragments.

library/multi_map.m:
	Add function forms of the predicates in this module, for use in the
	modified compiler modules.

runtime/mercury_misc.h:
runtime/mercury_stack_layout.h:
runtime/mercury_trace_base.h:
runtime/mercury_type_info.h:
	Define the macros that the compiler now generates.

runtime/mercury_goto.h:
	Define macros used to implement the macros in the above four header
	files.

runtime/mercury_bootstrap.h:
	Move the definitions of bool, TRUE and FALSE to the section where they
	are defined only if the user asks for them. This is to avoid conflict
	with the module name "bool".

tests/hard_coded/pragma_import.m:
	Rename bool to MR_bool.
2004-04-05 05:08:52 +00:00
Zoltan Somogyi
6909674f14 Bring these modules up to date with our current style guidelines.
Estimated hours taken: 8
Branches: main

library/*.m:
	Bring these modules up to date with our current style guidelines.
	Use predmode declarations where appropriate. Use state variable syntax
	where appropriate. Reorder arguments where this makes it possible to
	to use state variable syntax. Standardize format of predicate
	description comments. Standardize indentation.
2004-03-15 23:49:36 +00:00
Simon Taylor
a399037d05 Add predicates multi_map.to_flat_assoc_list
Estimated hours taken: 0.25
Branches: main

NEWS:
library/multi_map.m:
	Add predicates multi_map.to_flat_assoc_list
	and multi_map.from_flat_assoc_list, which use
	assoc_lists containing one element per key-value
	pair, not one element per key and all its values.
2003-12-01 01:18:05 +00:00
Zoltan Somogyi
6554ef7daa Replace "is" with "=".
Estimated hours taken: 2
Branches: main

Replace "is" with "=".
Add field names where relevant.
Replace integers with counters where relevant.
2003-05-26 09:01:46 +00:00
Mark Brown
88940110b7 Fix multi_map__from_corresponding_lists so that it works as
Estimated hours taken: 0.25
Branches: main, release

library/multi_map.m:
	Fix multi_map__from_corresponding_lists so that it works as
	expected if a key appears more than once in the key list.

tests/hard_coded/Mmakefile:
tests/hard_coded/multi_map_test.exp:
tests/hard_coded/multi_map_test.m:
	Test case.
2002-08-20 00:44:20 +00:00
Zoltan Somogyi
2e611da98e Make {multi_,}map__is_empty more efficient.
Estimated hours taken: 0.5

Make {multi_,}map__is_empty more efficient.

library/tree234.m:
	Add a tree234__is_empty predicate.

library/map.m:
library/multi_map.m:
	Call tree234__is_empty instead of tree234__init, since this does not
	require a complicated unification.
2000-03-28 03:41:11 +00:00
Fergus Henderson
7cb525fde3 Undo Zoltan's bogus update of all the copyright dates.
Estimated hours taken: 0.5

library/*.m:
compiler/*.m:
	Undo Zoltan's bogus update of all the copyright dates.
	The dates in the copyright header should reflect the years
	in which the file was modified (and no, changes to the
	copyright header itself don't count as modifications).
1998-01-23 12:33:43 +00:00
Zoltan Somogyi
9ae7acc593 Update all the copyright dates for 1998.
Estimated hours taken: 0.5

library/*.m:
	Update all the copyright dates for 1998.
1998-01-13 10:01:32 +00:00
Fergus Henderson
04b720630b Update the copyright messages so that (a) they contain the correct years
and (b) they say "Copyright (C) ... _The_ University of Melbourne".
1997-07-27 15:09:59 +00:00
Fergus Henderson
bd4f0a839b Wrap long lines, to avoid formatting problems in the
Estimated hours taken: 1

library/*.m:
	Wrap long lines, to avoid formatting problems in the
	automatically-generated library reference manual.
1997-07-25 03:44:47 +00:00
Fergus Henderson
8bc7cca677 Fix missing `import_module' declarations detected by stayls's
Estimated hours taken: 0.25

library/multi_map.m:
library/prolog.m:
	Fix missing `import_module' declarations detected by stayls's
	changes to implement `use_module'.
1997-06-30 17:23:32 +00:00
Tyson Dowd
cbcb23d17b Enable --warn-interface-imports by default.
Estimated hours taken: 3

Enable --warn-interface-imports by default. This was turned off while
list and term were defined in mercury_builtin.m, since it caused many
warnings.

Fix all the unused interface imports that have been added since then.

compiler/options.m:
	Enable --warn-interface-imports by default.

compiler/module_qual.m:
	Fix formatting inconsistencies with module names in warning
	messages. (".m" was not appended to module names if there was
	only one module).

compiler/*.m:
library/*.m:
tests/invalid/type_loop.m:
tests/warnings/*.m:
	Remove usused interface imports, or move them into
	implementation (mostly bool, list and std_util).
1997-05-21 02:16:53 +00:00
Dylan Shuttleworth
37aa01f8b1 A new library file based on map.m, where the data-type is a list of things.
Estimated hours taken: _3___

A new library file based on map.m, where the data-type is a list of things.
This gives a vague one-to-many storage class.  It's based on map for
flexability, and doesn't achieve much more than map and list together, but
it is nice.  It is also completely untested.  I'm adding it now, because I
disappear for 12 months in 4 days time.

library/multi_map.m
	added this file.
1995-12-29 03:54:53 +00:00