[m-dev.] For review: Add implementation of reference types (global heap)

Fergus Henderson fjh at cs.mu.OZ.AU
Wed Jun 10 16:06:26 AEST 1998


On 10-Jun-1998, Peter Schachte <pets at students.cs.mu.oz.au> wrote:
> And, of course, avoid that bug such definitions tickle in
> the Mercury compiler. ;-)

Incidentally, that bug is no longer a bug, it's now just a missing feature ;-)
That is, the compiler reports "Sorry, not implemented", rather than
generating incorrect code.

	bash$ mmc -E a.m
	a.m:004: Sorry, not implemented: polymorphic equivalence type,
	a.m:004:   with monomorphic definition, exported as abstract type.
		A quick work-around is just export the type as a concrete type,
		by putting the type definition in the interface section.
		A better work-around is to use a "wrapper" type, with just one
		functor that has just one arg, instead of an equivalence type.
		(There's no performance penalty for this -- the compiler will
		optimize the wrapper away.)
	bash$

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3        |     -- the last words of T. S. Garp.



More information about the developers mailing list