Re: Inlining errors...

2000-04-27 Thread Josef Sveningsson

On Wed, 19 Apr 2000, Jan-Willem Maessen wrote:

 I agree so wholeheartedly that I just write a (very!) short paper on
 the subject for ICFP (having discovered to my surprise that no such
 write-up existed).  It describes how to identify such expressions and
 hoist them out so they don't end up getting inlined.  It's still being
 refereed is thus likely to be revised, but if you're interested in a
 pre-print take a look (there are no pointers to it from elsewhere at
 the moment):
 
It's interesting reading. However, it seems to me that it would interact
badly with minimal typing derivations (mtd). Mtd is an algorithm for type
checking which computes the least general type instead of the most
general. This is used by some compilers to guide other optimisations. Some
optimisations, like certain representation analysises, do a better job on
less polymorphic code and therefore it is desirable to have less general
types.

Does ghc use mtd or some other heuristics to remove redundant
polymorphism?

/Josef

PS. Sorry for not having any pointers to mtd.





Minimal typing derivations and free theorems...

2000-04-27 Thread Jan-Willem Maessen

Josef Sveningsson [EMAIL PROTECTED] writes:
 It's interesting reading. However, it seems to me that it would interact
 badly with minimal typing derivations (mtd). Mtd is an algorithm for type
 checking which computes the least general type instead of the most
 general. This is used by some compilers to guide other optimisations.

My instinct is that any analysis which makes use of free theorems is
going to require a most general type.  This is because the free
theorems are based upon the most general type---and of course the more
polymorphism there is, the stronger the free theorems that can be
derived in general.  

That being said, I don't see any difficulty with using both kinds of
type information---the information we obtain with the two analyses is
different, and both types constrain program behavior in different
ways.  Mtd is unlikely to be useful for extracting bottoms, but there
is no reason bottom extraction should stop us from assigning a more
specific minimal type to an error-handling expression.

Actually, though, I wonder if mtd are useful at all for expressions
known to be bottom---this knowledge is an assertion that we need not
represent the value at all, and consequently seems strictly more
flexible than any representation we might choose by eliminating
polymorphism. 

The most important observation, really, is that we can still assign a
minimal type (like "Int") to a bottom expression, and thus that we
will not contaminate representation analysis or other mtd-based
optimizations.  And, in fact, its bottom-ness means we can assign such
a minimal type to each occurrence, so that the sharing of the bottom
expression need not introduce spurious polymorphism.

-Jan-Willem Maessen





ghc-4.06 installation -- libgmp.so.2?

2000-04-27 Thread Arthur H. Gold

I've been trying to install the last couple of ghc releases (from
various linux binaries). Installation itself goes OK, but ghc dies on
the lack of libgmp.so.2.

Unfortunately, the only libgmp releases I've seen build only a static
library.

Am I (no doubt) missing something?

Thanks,
--ag
-- 
Artie Gold, Austin, TX  (finger the cs.utexas.edu account for more info)
mailto:[EMAIL PROTECTED] or mailto:[EMAIL PROTECTED]
--
A: Look for a lawyer who speaks Aramaic...about trademark infringement.




Bcc: Re: ghc-4.06 installation -- libgmp.so.2?

2000-04-27 Thread Manuel M. T. Chakravarty


"Arthur H. Gold" [EMAIL PROTECTED] wrote,

 I've been trying to install the last couple of ghc releases (from
 various linux binaries). Installation itself goes OK, but ghc dies on
 the lack of libgmp.so.2.
 
 Unfortunately, the only libgmp releases I've seen build only a static
 library.
 
 Am I (no doubt) missing something?

Which distribution are you running?  If you use Red Hat,
just install the gmp-devel package that is on the binaries
CD.  Otherwise, a symbolic link from libgmp.so.2.x.y to
libgmp.so should also do the job.

Manuel