You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently (with cabal-install 3.6), when running cabal repl with multiple components, users see the following error message:
$ cabal repl comp1 comp2
cabal: Cannot open a repl for multiple components at once. The targets
'comp1' and 'comp2' refer to different components..
The reason for this limitation is that current versions of ghci do not support
loading multiple components as source. Load just one component and when you
make changes to a dependent component then quit and reload.
The ability to load REPL with multiple components is commonly known as "Multiple Home Units (MHU)". The following blog post by Matthew Pickering (Well-Typed) from January 7, 2022, claims that this feature is implemented in GHC and now it's up to build tools to support it:
I haven't found an issue in Cabal tracking the implementation of Multiple Home Units. There's a similar issue but it seems to be talking about something else:
I think we could just have a single point of support for now that turns a repl call with multiple targets into an invocation of ghci with multiple home units. However, that won't be super useful yet, given ghci's apparently limited support of multiple home units still. https://gitlab.haskell.org/ghc/ghc/-/issues/20889
Activity
Mikolaj commentedon Jun 22, 2022
Yes, I think you are right this is not being added yet and we do need it. PR welcome (perhaps many small PRs, baby step style)
gbaz commentedon Jul 23, 2022
I think we could just have a single point of support for now that turns a
replcall with multiple targets into an invocation of ghci with multiple home units. However, that won't be super useful yet, given ghci's apparently limited support of multiple home units still. https://gitlab.haskell.org/ghc/ghc/-/issues/20889phadej commentedon Jul 24, 2022
Apparently @wz1000 is working on this?
wz1000 commentedon Jul 26, 2022
Yes, I'm working on this. I'll have a patch up shortly.
ulysses4ever commentedon Sep 16, 2022
@wz1000 just a gentle inquiry: do you have any news on that patch you mentioned?
ocharles commentedon Nov 27, 2023
Did #8726 fix this?
mpickering commentedon Nov 27, 2023
Yes #8726 fixed this.