-fspecialize-all or the like?

Simon Peyton-Jones simonpj@microsoft.com
Mon, 22 Apr 2002 02:35:38 -0700

Actually, GHC does automatically specialise for all types
at which the function is called in that module, but it doesn't do
it across modules.  Why not?  Because it compiles bottom-up,
whereas the specialisation info is really top-down.

Have often thought that we could spit out specialisation info
into .spec files, and have some separate program to eat up
all the .spec files and produce specialisation pragmas for
all the modules... but never got around to it.  It would produce
quite a worthwhile speedup though, if anyone feels inclined to=20
tackle it. =20

(If anyone does, I have a good plan of action in my head.)


| -----Original Message-----
| From: Simon Marlow [mailto:simonmar@microsoft.com]=20
| Sent: 22 April 2002 10:15
| To: Hal Daume III; GHC Users Mailing List
| Subject: RE: -fspecialize-all or the like?
| > Is there any way to get your overloaded functions to
| > basically behave like
| > templates in C++; i.e., by "automatically" inserting {-# SPECIALIZE
| > ... #-} for every function, for every instance, for each=20
| type that is
| > actually used in the program?
| Short answer: no.  Sorry :)
| Simon
| _______________________________________________
| Glasgow-haskell-users mailing list=20
| Glasgow-haskell-users@haskell.org=20
| http://www.haskell.org/mailman/listinfo/glasgow-| haskell-users