On 10-Mar-1998, Alastair Reid <[EMAIL PROTECTED]> wrote:
> 
> I don't think it's as simple as you suggest:

Probably not, but as you say

> Issues 1 and 2 can be solved with sufficient effort.  In fact, you
> can probably go a long, long way to solving them by implementing
> cross-module inlining and a few simple optimisations.

and you want these features (cross-module inlining and analysis)
for other reasons anyway.

I think that given that it *can* be done by compiler
optimization, and given that the need for it is a relatively rare,
it's probably not worthwhile to provide a language extension
to guarantee that it *will* be done on all compilers.
(After all, if you're using something like Hugs which doesn't
do any optimization, then surely you don't really care that much
about efficiency anyway.)

Incidentally, a simpler and more generally useful language extension
which would also solve this problem is

        unsafe_cast :: a -> b

However, this is of course less safe, and prone to abuse ;-)

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


Reply via email to