Take the 2-minute tour ×

I'm going to guess the answer is 'no', but is there a way to import a symbol from a module that is not explicitly export from said module?

I tried looking up various ghc (6.12.1) flags like -XPackageImports, but I don't see anything that will do what I want? (which is purely for doing some quick & dirty testing without re-compiling some other modules; i don't actually want to write code this way)

share|improve this question

2 Answers 2

up vote 9 down vote accepted

No. There isn't even a dirty hack. The .hi files which are used by the type checker to find out the types of things of imported modules only contain info about exported names. The only way to change that is to edit the source file.

share|improve this answer


share|improve this answer

Your Answer


