Hadrian: Add ./hadrian/ghci.sh script for fast development feedback
authorMatthew Pickering <matthewtpickering@gmail.com>
Sun, 10 Mar 2019 17:43:10 +0000 (17:43 +0000)
committerMarge Bot <ben+marge-bot@smart-cactus.org>
Tue, 12 Mar 2019 13:04:52 +0000 (09:04 -0400)
commit2d7dd0285bbc364f89d4d97928674f7ea73ed2c8
tree64afbe9484037925efe0575e77971f532ac155fd
parent4cf2160afe0e08fe29576895a1eced863d3a521d
Hadrian: Add ./hadrian/ghci.sh script for fast development feedback

Running the `./hadrian/ghci` target will load the main compiler into
a ghci session. This is intended for fast development feedback, modules are only
typechecked so it isn't possible to run any functions in the repl.

You can also use this target with `ghcid`.

The first time this command is run hadrian will need to compile a few dependencies
which will take 1-2 minutes. Loading GHC into GHCi itself takes about 30 seconds.

Internally this works by calling a new hadrian target called `tool-args`.
This target prints out the package and include flags which are necessary
to load files into ghci. The same target is intended to be used by other
tooling which uses the GHC API in order to set up the correct GHC API
session. For example, using this target it is also possible to use HIE
when developing on GHC.
hadrian/README.md
hadrian/ghci.sh [new file with mode: 0755]
hadrian/hadrian.cabal
hadrian/src/Builder.hs
hadrian/src/Main.hs
hadrian/src/Oracles/Setting.hs
hadrian/src/Rules.hs
hadrian/src/Settings.hs
hadrian/src/Settings/Builders/Ghc.hs
hadrian/src/Settings/Flavours/GhcInGhci.hs [new file with mode: 0644]