With ghc, is there a way to import characters that are not explicitly exported?

I'm going to guess that the answer is no, but is there a way to import a character from a module that is not explicitly exported from the specified module?

I tried to find various ghc flags (6.12.1), for example XPackageImports , but I don’t see anything that will do what I want? (this is purely for doing quick and dirty testing without recompiling some other modules, I really don't want to write code this way)

+6
import module export haskell ghc
source share
2 answers

Not. Not even a dirty hack. The .hi files used by the type checker to find out about the types of imported modules contain information about the exported names. The only way to change this is to edit the source file.

+9
source share

Not

+1
source share

All Articles