use Hadrian to see if compiler compiles?
lists at richarde.dev
Mon Jan 24 22:28:32 UTC 2022
My recommendation: ./hadrian/ghci. The first time you run it, it may spin for a little while, but it will eventually deliver you to a GHCi prompt, with all of GHC loaded. (You can e.g. `:type splitTyConApp_maybe`, after `import GHC.Core.Type`.) At that point, :reload will be your dear friend. That's what I do when I'm doing e.g. module reorganization and care much more about "does it compile" than "does it work".
> On Jan 24, 2022, at 5:02 PM, Norman Ramsey <nr at cs.tufts.edu> wrote:
> I'm currently doing some refactoring of the GHC sources, which
> involves moving definitions between modules. As a sanity check
> I want to compile often, so if I've broken anything (or have inadvertently
> created circular imports) I can find out quickly. I'm currently using
> ./hadrian/build -j
> but I really don't need to build libraries or a stage 2 compiler.
> I tried looking over `./hadrian/build --help`, but I'm not confident
> that I understand what's there. My best guess is
> ./hadrian/build -j stage0:lib:ghc
> Would that accomplish my goal?
> ghc-devs mailing list
> ghc-devs at haskell.org
More information about the ghc-devs