Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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)

like image 408
aculich Avatar asked Feb 03 '11 00:02

aculich


2 Answers

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.

like image 94
nominolo Avatar answered Sep 30 '22 17:09

nominolo


No

like image 31
Thomas M. DuBuisson Avatar answered Sep 30 '22 17:09

Thomas M. DuBuisson