-
Notifications
You must be signed in to change notification settings - Fork 347
Automatically create process when opening haskell files #729
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
What happens if you only want to read a file from another project without actually running it (you want to verify how you wrote something, etc.)? Or you're writing Haskell-y pseudo-code which isn't expected to actually run? |
@ivan-m well, this is good question. The real issue is that there are four steps to bring REPL, and even if you answer "no" to first question ("start new project?") there follows another one ("choose haskell session"). I think if user answered "no", there should be no other questions. One thing I can think of is not to ask user about project name, but assign some better names automatically (also a question "start a new project" is very confusing for newcomers). I do not like default naming, at least it's be better to keep case in the project name, and typing custom name is too boring for me. Another point is working directory (this is last question I believe), I guess in cases of project workdir should be the same as cabal file dir by default (I can't be certain). For example, here is possible behaviour:
So, if interactive mode is enabled:
What do you think? |
For why you are asked to choose a session after you say you don't want to create a project: if you want to do some kind of session-based interaction (which is often also done in the save hook) and you don't want to create a new session, then you need to pick one that already exists... this is also useful when the automatic session-detection doesn't work properly. Of course, there should probably be a "no and I don't want to run it in a session" option. What do you mean by "assign better names automatically"? If it's a cabalised project then what better name could there be? If it isn't cabalised, well... maybe it could try and pick a name based upon the directory rather than just wanting to call it What does "load entire project" mean? To me, it indicates that ever single source file should be loaded into ghci, which I usually don't want. Whilst you almost definitely want the default options for directory, etc. there may be cases you don't (you may wish to have the current directory to be a sub-directory so that you can refer to other hierarchical modules relatively within that sub-directory which isn't listed in the cabal file's I also don't understand why there should be that caveat regarding a file being in There's also a situation that I'm facing where I have a sub-project within the main project; currently, it often thinks that modules belonging to the sub-project should be loaded in the session for the main project (and what makes it more confusing is that there is one module that is used by both, hence why I have them in the same repository). Ideally you'd be able to customise more of this behaviour, and even use |
Let's close this until we have some better proposal. |
I can't be certain, but I believe in past haskell-interactive-mode asked me to start new process each time project file opened (I can't speak about single
*.hs
files, because I use them very rarely), but now it's not true. It's just silently opens file.Is there some benefits of interactive mode without active process over plain haskell mode?
To activate interactive mode I have following in my init file:
The text was updated successfully, but these errors were encountered: