cvs commit: fptools/libraries/OpenGL/Graphics/Rendering/OpenG L/GL U Constants.hs fptools/libraries/OpenGL/specs/enumerant ConvertEnumSpec.hs test.stdout

Sven Panne Sven.Panne@informatik.uni-muenchen.de
Mon, 10 Feb 2003 23:20:52 +0100


Simon Marlow wrote:
 > Just a thought, but if the module in question contains lots of datatypes
 > you might want to try with -fno-generics, which will cut down on some of
 > the code we generate for each datatype, provided you don't use generics.

I've made a quick-and-dirty test with -fno-generics and the modules in
question became 10%-20% smaller, but they still generate lots of *.o
files. I don't understand the implementation of generics in detail,
but it looks like they entail two additional functions per algebraic
data type. The module in question has >90 algebraic data types, but
 >1200 constructors, so there is no big gain regarding the *.o files.

Hmmm, what about compatibility with code which uses generics? Would
HOpenGL work with it? It would be a bad idea for a library to make
some random assumptions about its intended usage...

Cheers,
    S.