
I am using haskell inside emacs with the usual setup ie .hs file in one window, ghci in another. Now the most usual workflow one would do is to load the file into ghci (C-c C-l) and try out something in ghci. A small niggle is that after the C-c C-l Ive to manually switch to the other window (current window does not switch to ghci automatically) This seems to be a strange default More importantly the state of the workspace in ghci seems to get messed up unless I do: 0. Prepare some code in .hs 2. Switch to ghci 3. Clear the ghci workspace with :m <nothing> 4. switch back to .hs 5. C-c C-l 6. Switch to ghci to try out new code Is there something I am missing?

On Fri, 2 Dec 2011 10:53:55 +0530, Rustom Mody wrote:
I am using haskell inside emacs with the usual setup ie .hs file in one window, ghci in another.
Now the most usual workflow one would do is to load the file into ghci (C-c C-l) and try out something in ghci. A small niggle is that after the C-c C-l Ive to manually switch to the other window (current window does not switch to ghci automatically) This seems to be a strange default
Actually I prefer it this way because I can check often if my types are OK, or that I don't have a typo. You can also rebind C-c C-l to execute C-x o after it.
More importantly the state of the workspace in ghci seems to get messed up unless I do: 0. Prepare some code in .hs 2. Switch to ghci 3. Clear the ghci workspace with :m 4. switch back to .hs 5. C-c C-l 6. Switch to ghci to try out new code
Is there something I am missing?
When I do C-c C-l it recompiles and/or reloads all my modules and wipes all the variables I had defined before, so I think steps 0 to 4 are not needed. Adrien PS: I assumed that you were using haskell-mode

On Fri, Dec 2, 2011 at 2:03 PM, Adrien Haxaire
On Fri, 2 Dec 2011 10:53:55 +0530, Rustom Mody wrote:
I am using haskell inside emacs with the usual setup ie .hs file in one window, ghci in another.
Now the most usual workflow one would do is to load the file into ghci (C-c C-l) and try out something in ghci. A small niggle is that after the C-c C-l Ive to manually switch to the other window (current window does not switch to ghci automatically) This seems to be a strange default
Actually I prefer it this way because I can check often if my types are OK, or that I don't have a typo. You can also rebind C-c C-l to execute C-x o after it.
More importantly the state of the workspace in ghci seems to get messed up unless I do: 0. Prepare some code in .hs 2. Switch to ghci 3. Clear the ghci workspace with :m 4. switch back to .hs 5. C-c C-l 6. Switch to ghci to try out new code
Is there something I am missing?
When I do C-c C-l it recompiles and/or reloads all my modules and wipes all the variables I had defined before, so I think steps 0 to 4 are not needed.
Yeah I guess I need to reproduce the case. Yesterday I kept getting errors until I started this protocol of 'cleaning the workspace' and then it worked. Need to reconstruct what that case was...
participants (2)
-
Adrien Haxaire
-
Rustom Mody