<div dir="ltr">Oh, I just remembered - I do this with `cabal repl`. So what I'm doing is usually starting with a small set of `build-depends` entries, and then changing my .cabal file and extending my REPL. I'm not installing new packages though. I agree, this would be a nice feature.</div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jan 20, 2018 at 4:38 AM, Michael Sloan <span dir="ltr"><<a href="mailto:mgsloan@gmail.com" target="_blank">mgsloan@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I've tested this out but can't get it to work.  Seems like ghci can<br>
only see packages that existed when it was loaded.  Would be a good<br>
thing to add to ghci or intero.<br>
<br>
If this was possible, then you could have a ghci macro that ran `stack<br>
build foo`, and, once it completed did `:set -package foo`.<br>
<div class="HOEnZb"><div class="h5"><br>
On Fri, Jan 19, 2018 at 7:16 AM, Oliver Charles <<a href="mailto:ollie@ocharles.org.uk">ollie@ocharles.org.uk</a>> wrote:<br>
> I think you can do :"set -package foo".<br>
><br>
> Does that do what you want?<br>
><br>
> On 19 Jan 2018 1:49 pm, "Simon Hafner" <<a href="mailto:hafnersimon@gmail.com">hafnersimon@gmail.com</a>> wrote:<br>
>><br>
>> Hello<br>
>><br>
>> I've been exploring some code via ghci, and I've found myself in this<br>
>> loop:<br>
>><br>
>> - write some code<br>
>> - figure out I need another package (e.g. mtl for runReaderT)<br>
>> - add package to cabal specification<br>
>> - reload stack ghci<br>
>> - Ctrl+R all the statements to replay the session so far<br>
>><br>
>> Is there a way to speed up the loop, e.g. via loading packages<br>
>> directly from ghci or saving/replaying a session?<br>
>><br>
>> Cheers,<br>
>> Simon<br>
>> ______________________________<wbr>_________________<br>
>> Haskell-Cafe mailing list<br>
>> To (un)subscribe, modify options or view archives go to:<br>
>> <a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-<wbr>bin/mailman/listinfo/haskell-<wbr>cafe</a><br>
>> Only members subscribed via the mailman list are allowed to post.<br>
><br>
><br>
> ______________________________<wbr>_________________<br>
> Haskell-Cafe mailing list<br>
> To (un)subscribe, modify options or view archives go to:<br>
> <a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-<wbr>bin/mailman/listinfo/haskell-<wbr>cafe</a><br>
> Only members subscribed via the mailman list are allowed to post.<br>
</div></div></blockquote></div><br></div>