[m-dev.] bug with tests/hard_coded/expand.m

Fergus Henderson fjh at cs.mu.oz.au
Fri Feb 28 14:53:41 AEDT 1997


Simon TAYLOR, you wrote:
> 
> > The Mercury compiler is failing the test in tests/hard_coded/expand.m;
> > it reports the following:
> > 
> > 	Software error: specialized argument not of higher-order type
> 
> A closure is being passed in as an argument of type T, rather than type 
> pred(...), so type_is_higher_order fails when higher_order.m tries
> to create the higher-order term inside the specialised version. The fix is
> to not attempt to specialise in these cases. There cannot possibly be a call
> to the closure within the specialised version anyway, since the old version
> didn't know that it was a closure.

Actually there could be, because the old version could use type_to_univ
and univ_to_type to find out that it was a closure.

But that is pretty unlikely, so not specializing in these cases is
still the right fix.

-- 
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