
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 tackle it. (If anyone does, I have a good plan of action in my head.) Simon | -----Original Message----- | From: Simon Marlow [mailto:simonmar@microsoft.com] | 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 | type that is | > actually used in the program? | | Short answer: no. Sorry :) | | Simon | _______________________________________________ | Glasgow-haskell-users mailing list | Glasgow-haskell-users@haskell.org | http://www.haskell.org/mailman/listinfo/glasgow-| haskell-users |