interpreter.nl:
Fix bug in mode declaration.
hlds.nl, mercury_to_mercury.nl:
Fix mode error in mercury_to_mercury.nl.
modes.nl:
Fix bug in handling of `erroneous' preds.
Fix a bunch of other errors including some mode errors.
prog_io.nl:
Fix type error introduced by last change.
Fix mode error in DCG expansion code.
type_util.nl:
Work around scoping problem with \=.
typecheck.nl:
Fix mode error.
prog_io.nl, hlds.nl, modes.nl, mercury_to_mercury.nl, require.nl:
Handle `is erroneous' and `is failure' proc declarations.
Add `is erroneous' to the declaration of error/1.
prog_io.nl:
Report errors in proc declarations instead of just
ignoring them.
hlds.nl:
Fix a mode error (variable numbering error) detected by the
mode checker.
modes.nl:
Fix a minor formatting problem in error message.
mercury_builtin.nl:
Change the work-around for higher-order predicate modes
so that it doesn't cause mode errors.
prog_io.nl:
- Add a new inst `not_reached' (intended for internal use by the
compiler, but for the moment at least we also allow it in user
code).
- Parse abstract inst definitions, with the syntax
:- inst foo is private.
type_util.nl, typecheck.nl, codegen.nl, Makefile, doit.nl:
- Add a new module `type_util'.
- Move make_type_id from typecheck.nl to type_util.nl.
- Rename vartype_to_type as classify_type, move it from
codegen.nl to type_util.nl, and modify the interface slightly.
- Move the type_is_enumeration stub from codegen.nl to type_util.nl,
and implement it.
- Implement type_is_atomic.
modes.nl:
- Distinguish between simple_unify's and complicated unifies by
calling type_is_atomic.
- Check that the final insts of the head vars match that specified
by the mode declaration.
- Handle (some cases of) unreachable code, using the `not_reached'
inst. More work needed on this.
- Improve the error message in the case where there is a single
delayed goal in a conjunction. (Instead of printing out the
generic "mode error in conjunction" message, we now print out
the error message for the delayed goal in question.)
- Fix bug where it didn't realize that bound('.'(ground, ground))
was the same as ground (due to missing clauses for inst_is_compat_3).
Most of these changes have not yet been tested.
modes.nl:
Implement mode-checking for constants and functors.
hlds.nl, hlds_out.nl, make_hlds.nl, codegen.nl:
Change the `cons_id' type so that it can handle constants of
the builtin types int, string, and float.
Also make codegen.nl handle character constants.
mercury_builtin.nl:
Trivial fix of comment.
prog_io.nl:
Fix capitalization in warning message.
followvars.nl:
A couple of bug fixes.
hlds.nl:
Change mode_is_input and mode_is_output so that abstract
insts are assumed to be bound.
Add predicate `inst_is_ground'.
Add predicate `moduleinfo_set_num_errors'.
Also change instmap_delta back into a map again (probably a mistake! -
but I'll fix it later).
map.nl:
Add predicate `map__from_sorted_assoc_list'.
mercury_to_mercury.nl:
Export `mercury_output_inst' and `mercury_output_mode_list'.
modes.nl:
Lots of changes. It should be almost useable now.
options.nl:
Add a new --modecheck option to invoke the mode checker.
This is disabled by default since the modechecker doesn't
quite work yet.
parser.nl:
Remove obsolete comment.
prog_io.nl:
Ensure that the bound insts in a bound(...) list are in sorted
order.
set.nl:
Add predicate `set__sorted_list_to_set'.
toplevel.nl:
Changed to match the new interface to `modecheck'.
Also don't generate code if there were any errors detected by
make_hlds.
typecheck.nl:
Fix a couple of minor typos in the error messages.
(2) Fix the singleton variable warnings in prog_io.nl (found and fixed
a bug in the DCG expansion).
(3) Improve the error reporting in typecheck.nl
(4) Improve the layout of error messages.
llds.nl:
Add an XXX comment.
--------------------
options.nl, prog_io.nl:
Add a -I option.
--------------------
bintree.nl:
Add predicates to work out the depth and number of items
in a bintree.
map.nl:
Make the fact that maps are bintrees externally visible,
so that toplevel.nl can print out some stats about some maps.
toplevel.nl:
Print out some stats about the pred, type, and cons maps.
mercury_to_mercury.nl:
New file: converts the prog_io data structure back into Mercury source
code.
term_io.nl:
Export mercury_quote_string for use by mercury_to_mercury.nl.
Makefile, doit.nl:
Add mercury_to_mercury.
options.nl, toplevel.nl:
Add a new option to save the interface of a module to a `.int' file,
using mercury_to_mercury.
Makefile:
Modify the rule for the `clean' target so that it removes `.int' files.
mercury_builtin.nl:
Fix the module name.
std_util.nl:
Suppress warnings from nit.
prog_io.nl:
An error message was omitting the file name & line number.
Also ensure that all error messages start with "error:".
codegen.nl, interpreter.nl, bintree.nl, list.nl:
Fix stuff detected by nit.
make_hlds.nl:
Transform to `semi-homogeneous' form (still need to expand
unifications).
prog_util.nl:
Fix bug.
mercury_builtin.nl:
Add call/1.
hlds.nl:
Add a count of the number of errors and warnings to the module_info
data structure.
toplevel.nl:
Continue processing after syntax errors.
modes.nl:
New file. At the moment it just checks for undefined modes and
undefined insts.
Makefile, doit.nl:
Add new files modes.nl and prog_util.nl.
term.nl:
Add term__var_to_int.
toplevel.nl:
Call the mode checker.
prog_io.nl, make_hlds.nl, hlds.nl:
Allow for the possibility of abstract `inst' definitions,
just like abstract type definitions. Currently they
are allowed for in the data structure, but they aren't
parsed correctly, and the utilities in hlds.nl don't handle
them that well.
hlds.nl:
Move `unqualify_name' to prog_util.nl.
make_hlds.nl:
Move `split_types_and_modes' to prog_util.nl.
mercury_to_goedel.nl, toplevel.nl:
Move the equivalence type expansion code to prog_util.nl.
builtin.nl, toplevel.nl:
Add a new module `builtin.nl' which gets automatically imported
into every module. In it, define the standard modes input,
output, etc., and various other stuff.
std_util.nl:
Move the defintion for \= to builtin.nl.
Remove the definition of ~=.
prog_io.nl:
Export parse_goal/2, since it's used by mercury_to_goedel.
mercury_to_goedel.nl:
Fix various type errors.
list.nl, int.nl, io.nl, codegen.nl, det_analysis.nl, llds.nl, hlds_out.nl:
Fix various syntax errors, typos and errors in type and mode
declarations discovered by mercury_compile.
Optimize for the common case of non-polymorphic types & predicates.
term.nl: Rename term__apply_substitution as term__apply_rec_substitution
and add a new term__apply_substitution for when you want
non-recursive application. Fix logic bug in
term__substitute_corresponding.
varset.nl: Fix logic bug in varset__merge.
io.nu.nl: Fix typo in error message.
term_io.nu.nl: Fix bug in the code used to work-around the NU-Prolog
getToken bug for empty strings.
prog_io.nl: Fix bug: the string "\+" should have been "\\+".
Also fixed LOTS of type errors (discovered by the typechecker,
hurray it now works!).
int.nl, list.nl, std_util.nl: Added pred & mode declarations for some
NU-Prolog predicates that we are using.
toplevel.nl, mercury_to_goedel.nl, hlds.nl:
move unqualify_name/2 to hlds.nl.
typecheck.nl: Fix design problem with typevarsets; fix bug where I had
forgotten to rename apart the types for constructors.
prog_io.nl, prog_out.nl: improve error messages.
various: inlined calls to require/2 to improve efficiency.
various: added an extra arg to io__progname to specify the default
in case the program name isn't available.
bintree.nl: modified tree structure slighyl to improve efficiency.
io.nl, io.nu.nl: added predicate io__stream_name and code to keep track
of the name of each stream.
term.nl: store filenames as part of term__context.
prog_out.nl: print out the filename part of a term__context
term_io.nl: initialize the filename when reading in a term
list.nl: add member_chk/2.
various places: replace `integer' with `int'.
did a bit more work on the type-checker. It now runs without crashing,
although the results are still buggy.
toplevel.nl: added code to read in a module and all the modules
that it depends upon.
added code to handle abstract type definitions.
Moved most of the non-logical NU-Prolog code from io.nl and term_io.nl into
io.nu.nl and term_io.nu.nl respectively. Rewrote the rest in logical Mercury.
Modified io__write_term to escape string constants if necessary.
Added char.nl and moved some of the predicates in string.nl into char.nl.
Rewrote some of the predicates in these files to avoid NU-Prolog dependencies.
Added a few new predicates.
Modified mercury_to_goedel.nl to correctly output variable names without
any danger of name clashes. Also modified it to correctly escape string
constants. Also modified it to correctly output functor names even
for nasty functors.
Did a little more work on the typechecker.
Moved the non-logical NU-Prolog code in require.nl into require.nu.nl.
Fix bug in prog_io.nl where combined type-and-mode declarations were
getting reversed.
Modified io.nu.nl and require.nu.nl so that calls to error/1 will
actually cause the program to abort.
In prog_io.nl: allow "\+" as a synonym for "not".
- Added some new targets to the Makefile.
- In mercury_to_goedel.nl: handle calls to require/2.
- Replaced "require(fail, ...)" with "error(...)".
- Removed uses of floating point division in array.nl.
- Changed io__progname to take two io__state arguments.
- Removed direct references to $string from io.nl so that it is self-applicable.
- Added pair.nl and changed map.nl to use it.
reject them as syntax errors).
- Change predicates in term.nl to use `term__' prefix instead of `term_'.
- Change predicates in string.nl to use `string__' prefix instead of `string_'.
- Change the types in prog_io.nl so that they store determinism
annotations for mode and predicate declarations (the code still needs
to be fixed to parse these new annotations.)
- Add some new predicates to term.nl.
- Did some more work on mercury_to_goedel.nl.
- Various bug fixes.
where the error occurred.
Note that line numbers are still not stored in the hlds yet, so
we need to do some more work so that the typechecker, etc. can also
report line numbers.
Lots of bug fixes for make_hlds.nl.
A couple of bug fixes for hlds.nl.
Did some optimization of memory usage: added io__gc_call to io.nl
and used it in prog_io.nl and module.nl. Rewrote the main loop
of prog_io to take maximum advantage of manual garbage collection.
Started working on typecheck.nl.