Assume I have a few Haskell modules, and I want to run them in an environment that requires the whole program to be entered as a single module (e.g. static analyzers, programming competition websites etc.). This might also be interesting for performance, to see if GHC does better when it sees all code of the application at once.
Disregarding corner cases like differences in the set of language pragmas, or orphan instances, it seems plausible that there is a way to combine these modules into one (and I could probably do it by hand).
But is there a better, automated way?