haskell-mode
                                
                                 haskell-mode copied to clipboard
                                
                                    haskell-mode copied to clipboard
                            
                            
                            
                        Migration instructions from (add-hook 'haskell-mode-hook 'inf-haskell-mode)
Previous versions would allow me to connect to inferior-haskell-mode using hook
(add-hook 'haskell-mode-hook 'inf-haskell-mode)
(as an alternative to 'interactive-haskell-mode).  Now Emacs tells me:
File mode specification error: (void-function inf-haskell-mode)
This "inferior" mode had a simple interaction model, e.g. with C-c C-l load the current buffer into GHCi, displayed in the haskell buffer.
How can I set this up with the latest haskell-mode?
(I suggest to add such instructions to the user manual.)
Also, when I type C-c C-l I just get
haskell-mode-enable-process-minor-mode: Run ‘C-h f haskell-mode‘ for instruction how to setup a Haskell interaction mode.
However, the information given there are not very helpful. (See complaint at https://stackoverflow.com/questions/56501112/haskell-emacs-haskell-mode-run-c-h-f-haskell-mode-for-instruction-how-to-setu)
Thanks. What do you mean by "previous versions"? I don't think there has been an "inf-haskell-mode" for at least 3 years.
The docs for C-h f haskell-mode don't seem too terrible:
Additional Haskell mode modules can be hooked in via ‘haskell-mode-hook’. ... Interaction modes:
‘interactive-haskell-mode’ Interact with per-project GHCi processes through a REPL and directory-aware sessions.
but I guess some basic knowledge of using hooks is assumed.
I do think there's an argument for making haskell-mode-hook include interactive-haskell-mode by default, though. This way, it can be disabled, but C-c C-l would do something reasonable by default. Some separate packages like intero override these keys by providing their own minor modes. Worst case, with intero etc. the inf-haskell.el code would be loaded but not really used.