haskell-opengl / OpenGLRaw

Haskell bindings to OpenGL (direct C bindings)
http://www.haskell.org/haskellwiki/OpenGL
BSD 3-Clause "New" or "Revised" License
47 stars 19 forks source link

Functions module too big #33

Closed iliastsi closed 8 years ago

iliastsi commented 8 years ago

The Functions module is too big (nearly 50000 lines of code) causing very high compilation times when using the LLVM code generator. It seems that GHC's LLVM code generator is at fault here, but the compilation times could (significantly) be decreased, if the Functions module were to be split.

The above problem means that OpenGLRaw cannot be built for the arm* architectures on Debian (see also the discussion here).

Would you consider splitting the Functions module? Feel free to use the code from here or ask me to do a PR.

svenpanne commented 8 years ago

Yes, I think that splitting up the Functions module into more digestible makes sense. To avoid API breakage, I think the right way to do this is to have various smaller hidden sub-modules, which are in turn re-exported through the old Functions module. I'll have a look at this...

svenpanne commented 8 years ago

I've just released a new version of OpenGLRaw with a chunked Functions module. The changes are based on your patch, with a few differences: