use Hadrian to see if compiler compiles?

Norman Ramsey nr at
Tue Jan 25 19:15:49 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".

Cool!  Supposing I wanted to run just a little code that uses the GHC API.
Would there be a way to load the Prelude and similar things into that GHCi,
so it could know about Bool and IO and such things?


More information about the ghc-devs mailing list