Viewing the types declared in GHC.Prim in local machine
ben at smart-cactus.org
Mon Mar 19 17:04:59 UTC 2018
Abhiroop Sarkar <asiamgenius at gmail.com> writes:
> Is it possible to view the types generated in the GHC.Prim module on my
> local machine?
> The commentary states that it is a virtual module and a source file
> including dummy declarations are available in this location: `
> libraries/base/GHC/Prim.hs`, however, upon downloading and building the
> latest GHC codebase I could not find this dummy file on my machine. Do I
> have to modify my Makefile somehow to generate these dummy types?
Indeed GHC.Prim is no longer exposed by `base`; it's now in the
`ghc-prim` library. If you have built the compiler you should find the
module generated for Haddock in
libraries/ghc-prim/dist-install/build/autogen/GHC/Prim.hs. I've updated
the commentary to reflect this new location.
You can also use the :browse GHCi command to dump the module's declarations.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 487 bytes
Desc: not available
More information about the ghc-devs