tests/invalid/*.{m,err_exp}:
tests/misc_tests/*.m:
tests/mmc_make/*.m:
tests/par_conj/*.m:
tests/purity/*.m:
tests/stm/*.m:
tests/string_format/*.m:
tests/structure_reuse/*.m:
tests/submodules/*.m:
tests/tabling/*.m:
tests/term/*.m:
tests/trailing/*.m:
tests/typeclasses/*.m:
tests/valid/*.m:
tests/warnings/*.{m,exp}:
Make these tests use four-space indentation, and ensure that
each module is imported on its own line. (I intend to use the latter
to figure out which subdirectories' tests can be executed in parallel.)
These changes usually move code to different lines. For the tests
that check compiler error messages, expect the new line numbers.
browser/cterm.m:
browser/tree234_cc.m:
Import only one module per line.
tests/hard_coded/boyer.m:
Fix something I missed.
pragmas but it now emits an error message saying what pragma in the "new"
foreign language interface to use instead. (That will be deleted after the
next release.)
Remove support for nondet foreign code from the implementation.
Add some bits from the old C interface chapter of the reference manual,
about linking with C object files and the c_pointer type, to the chapter
on the foreign language interface; delete the rest.
Add an illustration of simulating nondet foreign code with Mercury clauses
and (semi)deterministic foreign_procs.
doc/reference_manual.texi:
Delete the old C interface chapter.
Add a section on linking against C object files to the C specific
section of the foreign language interface chapter. (The old version of
this was quite mmake-specific, the new version attempts to minimise
this.)
Mention the c_pointer type in section on C foreign types.
Mention that nondet foreign_procs are not allowed. Give an example
to use foreign code and nondeterminism.
compiler/prog_io_pragma.m:
Emit error messages when any of the pragmas used by the old C interface
are encountered.
compiler/prog_item.m:
Delete the parse tree representation of import pragmas.
compiler/gcc.m:
Replace `:- pragma import' declarations with `:- pragma foreign_proc'
declarations for C.
compiler/add_heap_ops.m:
compiler/add_trail_ops.m:
compiler/add_pragma.m:
compiler/deep_profiling.m:
compiler/det_analysis.m:
compiler/equiv_type.m:
compiler/erl_call_gen.m:
compiler/foreign.m:
compiler/goal_util.m:
compiler/hlds_out_goal.m:
compiler/make_hlds_passes.m:
compiler/make_hlds_warn.m:
compiler/mercury_to_mercury.m
compiler/ml_code_gen.m:
compiler/module_qual.m:
compiler/modules.m:
compiler/polymorphism.m:
compiler/pragma_c_gen.m:
compiler/proc_gen.m:
compiler/prog_data.m:
compiler/recompilation.version.m:
Delete stuff related the old C interface.
tests/hard_coded_Mmakefile:
tests/hard_coded/inline_nondet_pragma_c.*:
tests/hard_coded/nondet_c.*:
tests/hard_coded/nondet_pragma_c_bug.*:
tests/hard_coded/pragma_import.*:
Delete these tests. The features they exercise are no longer
supported.
tests/*/*.m:
Replace uses of the old C interface with the new.
For review by anyone.
Estimated hours taken: 10
Branches: main, release
Do not allow non-abstract instance declarations to occur in module
interfaces. Emit an error message if this occurs.
Fix the formatting of some error messages regarding typeclasses
and instances.
compiler/check_typeclass.m:
Use error_util to generate the error messages from this module.
This fixes a problem where the printing of sym_names and arities
differed in the same error message.
compiler/error_util.m:
Add a format component for the pred_or_func type.
Add the equivalence type format_components.
compiler/make_hlds.m:
Make the format of some error messages concerning typeclasses
more consistent.
compiler/modules.m:
Check for non-abstract instance declarations in module interfaces
and emit an error message if they do.
tests/invalid/Mmakefile:
tests/invalid/instance_bug.m:
tests/invalid/instance_bug.err_exp:
Test case for the above.
tests/hard_coded/typeclasses/*:
tests/invalid/*:
tests/recompilation/*:
tests/valid/*:
Update test cases as necessary.
Estimated hours taken: 1
Improve the error message for errors in type class instance
definitions that use the named (e.g. "pred(foo/N) is bar") syntax, as
suggested by Ralph Becket: for such procedures, just output "in bar/N"
rather than "in call to bar/N", since the user didn't write any
explicit call.
compiler/hlds_pred.m:
Add a new marker `named_class_instance_method' to the pred_marker type.
compiler/hlds_out.m:
compiler/intermod.m:
Handle the new marker.
compiler/check_typeclass.m:
For instance methods defined using the named syntax,
add the `named_class_instance_method' marker to their markers.
compiler/typecheck.m:
compiler/mode_errors.m:
Pass the pred_markers down to hlds_out__write_call_arg_id.
compiler/hlds_out.m:
Change hlds_out__write_call_arg_id so that for predicates with
the `named_class_instance_method' marker, it doesn't output the
"call to".
tests/invalid/Mmakefile:
tests/invalid/method_impl.m:
tests/invalid/method_impl.exp:
A regression test.