<p><code>cabal repl</code> loads the necessary context or something so that <code>:reload</code> works as expected</p>

CC BY-SA 4.0
2022-01-22T11:03:35.783Z
Other answer was deleted because it was not an answer.  It was a suggestion if "something to try".  It should have been a comment.  This is also not an acceptable answer according to: [answer]
gRebel
CC BY-SA 4.0
2022-01-22T11:04:30.600Z
As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer).
Community
CC BY-SA 4.0
2022-01-28T00:08:31.033Z
It answered the question. It probably would have been appropriate to suggest an improvement, rather than deleting it. This site will be most successful when people feel comfortable participating.
Mitchell Turner
CC BY-SA 4.0
2022-01-19T03:24:00.890Z
2022-01-27T22:42:18.090Z
2022-01-27T22:42:18.090Z
dspyz
<p>I copied the plutus-starter template: <a href="https://github.com/input-output-hk/plutus-starter" rel="nofollow noreferrer">https://github.com/input-output-hk/plutus-starter</a> and created a file <code>BasicPlutusTx.hs</code> (and added it under <code>exposed-modules</code> in the <code>.cabal</code> file).</p>
<p>Then I started copying over all the code from the introductory tutorial: <a href="https://plutus.readthedocs.io/en/latest/plutus/tutorials/plutus-tx.html" rel="nofollow noreferrer">https://plutus.readthedocs.io/en/latest/plutus/tutorials/plutus-tx.html</a></p>
<p>As I work with the tutorial, I like being able to make changes to the code and then see how that affects things in <code>ghci</code>. I usually use <code>stack</code> and <code>hpack</code> and run <code>ghci</code> with <code>stack ghci</code>. When I do this, I can just type <code>:reload</code> in <code>ghci</code> and it recompiles any changes I've made. But that doesn't seem to work here. Even if I run <code>cabal build</code> in a separate tab, it doesn't. It seems like I have to quit <code>ghci</code>, run <code>cabal build</code>, and then re-run <code>ghci</code> and re-import everything again. Is there a better way?</p>

<haskell><plutus-starter><ghci>
How do I `:reload` in `ghci`
# How do I `:reload` in `ghci`

(Asked by: username_0 on 2022-01-16)

I copied the plutus-starter template: <https://github.com/input-output-hk/plutus-starter> and created a file `BasicPlutusTx.hs` (and added it under `exposed-modules` in the `.cabal` file).

Then I started copying over all the code from the introductory tutorial: <https://plutus.readthedocs.io/en/latest/plutus/tutorials/plutus-tx.html>

As I work with the tutorial, I like being able to make changes to the code and then see how that affects things in `ghci`. I usually use `stack` and `hpack` and run `ghci` with `stack ghci`. When I do this, I can just type `:reload` in `ghci` and it recompiles any changes I've made. But that doesn't seem to work here. Even if I run `cabal build` in a separate tab, it doesn't. It seems like I have to quit `ghci`, run `cabal build`, and then re-run `ghci` and re-import everything again. Is there a better way?

**Tags:** haskell, plutus-starter, ghci

---

## 1 answers

### Answer by username_0 on 2022-01-19. Score: 0 | Accepted answer

`cabal repl` loads the necessary context or something so that `:reload` works as expected

> **Comments:**
> **username_1**: Other answer was deleted because it was not an answer.  It was a suggestion if "something to try".  It should have been a comment.  This is also not an acceptable answer according to: [answer]  
> **username_2**: As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer).  
> **username_3**: It answered the question. It probably would have been appropriate to suggest an improvement, rather than deleting it. This site will be most successful when people feel comfortable participating.  

---

