
Brandon S. Allbery KF8NH wrote:
On Nov 21, 2007, at 19:57 , Galchin Vasili wrote:
Hi Ian,
I am trying to dump out all function signatures exported from System.Directory. I just tried inside ghci: :! ghc --show-iface System.Directory. This is getting closer ... thank you! However, now there appears to be a "path" problem because I get an error message: " System.Directory: openBinaryFile: does not exist (No such file or directory)". ??
Just for reference: --show-iface is intended to operate on an explicitly specified .hi file, not a module name. You could locate System\Directory.hi in the ghc lib directory and run ghc --show-iface on that, or just use :browse.
Also, --show-iface dumps low-level compiler data. In particular, it doesn't necessarily show you exactly what the module exports - but rather, it shows you when GHC might inline into client modules. ;-) If you want the callable interface, you want to be using the :browse command, not playing with interface files.