[m-rev.] for review: fix testing of `ground' matches `bound'

Simon Taylor stayl at cs.mu.OZ.AU
Tue Jul 8 15:17:27 AEST 2003


On 08-Jul-2003, David Overton <dmo at cs.mu.OZ.AU> wrote:
> Estimated hours taken: 1.0
> Branches: main
> 
> Fixes to allow testing of `ground' matches `bound'.
> 
> compiler/modules.m:
> 	When writing discriminated union types to the .int2 file, write
> 	out the full type definition rather than an abstract type
> 	declaration.  This is necessary because a module which
> 	transitively imports the .int2 file may need to know the
> 	constructors to allow `ground' to be compared with `bound'
> 	insts.  See the new test case `transitive_inst_type' for an
> 	example.
> 
> tests/invalid/undef_symbol.err_exp:
> 	Adjust output to remove an error message that no longer occurs
> 	now that the .int2 file contains the full type definition.

You should mark types for which the full definition comes from a
`.int2' files as `abstract_imported', then not allow matches against
the constructors of those types in typecheck.m unless compiling an
`opt_imported' predicate. We would then still report errors for uses
of non-imported constructors.

Simon.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list