summaryrefslogtreecommitdiff
path: root/hadrian/src/Settings.hs
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2019-03-10 17:43:10 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-03-12 09:04:52 -0400
commit2d7dd0285bbc364f89d4d97928674f7ea73ed2c8 (patch)
tree64afbe9484037925efe0575e77971f532ac155fd /hadrian/src/Settings.hs
parent4cf2160afe0e08fe29576895a1eced863d3a521d (diff)
downloadhaskell-2d7dd0285bbc364f89d4d97928674f7ea73ed2c8.tar.gz
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.
Diffstat (limited to 'hadrian/src/Settings.hs')
-rwxr-xr-xhadrian/src/Settings.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/hadrian/src/Settings.hs b/hadrian/src/Settings.hs
index bc0f8cecaa..3089c0a4e6 100755
--- a/hadrian/src/Settings.hs
+++ b/hadrian/src/Settings.hs
@@ -18,6 +18,7 @@ import Settings.Flavours.Profiled
import Settings.Flavours.Quick
import Settings.Flavours.Quickest
import Settings.Flavours.QuickCross
+import Settings.Flavours.GhcInGhci
getArgs :: Args
getArgs = expr flavour >>= args
@@ -38,7 +39,8 @@ hadrianFlavours =
[ defaultFlavour, developmentFlavour Stage1, developmentFlavour Stage2
, performanceFlavour, profiledFlavour, quickFlavour, quickestFlavour
, quickCrossFlavour
- , performanceLlvmFlavour, profiledLlvmFlavour, quickLlvmFlavour ]
+ , performanceLlvmFlavour, profiledLlvmFlavour, quickLlvmFlavour
+ , ghcInGhciFlavour ]
flavour :: Action Flavour
flavour = do