Hey Sam,
Starting from the implementation of :browse and going through the call
graph in:
https://gitlab.haskell.org/ghc/ghc/blob/master/ghc/GHCi/UI.hs
gave the following, which works for me:
module Main where
import Control.Monad
import Control.Monad.IO.Class
import
Brandon Allbery writes:
> No, those are in base. But I don't think you would be seeing imported names
> as such there, come to think of it, only names declared locally.
Hmm, then perhaps I misunderstand what it's doing.
If I do what I thought might be the equivalent ghci command
λ> :l
No, those are in base. But I don't think you would be seeing imported names
as such there, come to think of it, only names declared locally.
On Fri, Aug 2, 2019 at 4:06 PM Sam Halliday wrote:
> Brandon Allbery writes:
>
> > At a guess, because the ghc package defaults to being hidden (it's
>
Brandon Allbery writes:
> At a guess, because the ghc package defaults to being hidden (it's creating
> a new ghc instance at runtime, so the visibility of the ghc package when
> compiling your code is not relevant) you need to do the ghc-api equivalent
> of "-package ghc". Or for testing just
At a guess, because the ghc package defaults to being hidden (it's creating
a new ghc instance at runtime, so the visibility of the ghc package when
compiling your code is not relevant) you need to do the ghc-api equivalent
of "-package ghc". Or for testing just "ghc-pkg expose ghc".
On Fri, Aug
To answer my own question with a solution and another question:
Sam Halliday writes:
> I'm mostly interested in gathering information about symbols and their
> type signatures. As a first exercise: given a module+import section
> for a haskell source file, I want to find out which symbols (and
. I went looking in the GHC source, only to discover that you, Simon, are
apparently deeply