Closed angerman closed 5 years ago
See https://github.com/ndmitchell/ghcid/issues/140 which describes how to do it at the moment.
@angerman By "rule" do you mean a build rule? Could you clarify how it would look like?
Say, we call it repl
-- what would hadrian repl
need to build/do?
I think that ideally you would also need to build the in-tree ghc-boot-th
package. I remember some problems with this.
In my mind, calling hadrian repl
will load a GHCi session with all modules of GHC loaded.
Also see https://github.com/ghc/ghc/pull/154
The PR @mpickering linked to above is now superseded by https://phabricator.haskell.org/D4904 . One cool thing about this change is that it allows you to run GHC within GHCi, so you can try out your modified GHC after reloading. GHCi inside GHCi works too!
FYI I am looking into adding this to hadrian. Whatever I come up with will likely depend on D4904 being merged.
Feel free to use this issue for asking questions about problems encountered while trying to implement this, if any. And thanks, because this should be quite useful. I'll make sure to documet the ghci command here once you're done.
EDIT: Was going to give up, but nevermind, I'll try again to get things building via hadrian :)
See https://github.com/ghc/ghc/pull/179 which solves this ticket.
ghc/ghc#179 was merged, should this issue be closed?
@monoidal Yes, I think so. Let me close this issue, but if anything still needs to be done, a new ticket should better be opened on GHC Trac.
As raised by @nomeata on ghc-devs, it would be nice if Hadrian had a rule to load all of GHC into GHCi.