You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Various major modes for haskell exist that are not haskell-mode, (haskell-ts-mode, haskell-ng-mode), and users of both are forced to pull haskell-mode since it provides a major mode for cabal. Would it be practical to support cabal-mode from haskell-mode in its own package?
Probably, yes. The steps we'd need to follow would be approximately the following:
Create a new repo called cabal-mode with cabal.el, starting out as a copy of haskell-cabal.el.
Change all the haskell-cabal- identifier prefixes to cabal-.
Remove the (require 'haskell-utils) and figure out what would break. If anything, fix it if practical.
Publish a corresponding cabal package on MELPA and/or ELPA.
Remove haskell-cabal.el from haskell-mode, and perhaps (though probably not) make haskell-mode depend on the cabal package.
This is also relevant to my interests, because I'm personally working with haskell-ts-mode instead of haskell-mode. However, I'm not working much with Haskell at the moment, so I'm unlikely to work on the above steps myself.
Probably, yes. The steps we'd need to follow would be approximately the following:
* Create a new repo called `cabal-mode` with `cabal.el`, starting out as a copy of `haskell-cabal.el`.
* Change all the `haskell-cabal-` identifier prefixes to `cabal-`.
* Remove the `(require 'haskell-utils)` and figure out what would break. If anything, fix it if practical.
* Publish a corresponding `cabal` package on MELPA and/or ELPA.
* Remove `haskell-cabal.el` from `haskell-mode`, and _perhaps_ (though probably not) make `haskell-mode` depend on the `cabal` package.
This is also relevant to my interests, because I'm personally working with haskell-ts-mode instead of haskell-mode. However, I'm not working much with Haskell at the moment, so I'm unlikely to work on the above steps myself.
I spent a lot of time writing code for my personal projects during the summer. Also it feels like haskell-mode is a big project, it is hard to get a good understanding of it, I dont know where to start. But I would love to get into haskell-mode and I would be like to help with this issue. I can create a new repo, in my account I guess since I dont have haskell organization permissions and separate the cabal mode into that and ping you when I am getting somewhere.
That sounds good, @webdevred — ping me if you need anything, or when there's anything to show. In due course we could then fold it back into this org for community maintenance.
Hello @puff-paddy,
Update from my side:
So far I found three definitions in haskell-utils.el used by haskell-cabal.el, they are haskell-mode-toggle-interactive-prompt-state along with its toggle variable haskell-mode-interactive-prompt-state and haskell-utils-read-directory-name.
haskell-utils-read-directory-name, however is only used in haskell-cabal-get-dir, a function which is not used inside haskell-cabal.el but it is used in haskell-session.el.
This is is example of where haskell-mode-toggle-interactive-prompt-state is used:
Yeah, it would make sense to remove haskell-cabal.el. In a purist sense, haskell-mode shouldn't really depend on the cabal-mode package. Over time, haskell-mode has turned into a big Haskell IDE bundle, which isn't super desirable IMO, and static package dependencies make it hard to swap out non-core portions.
Activity
purcell commentedon Sep 8, 2025
Probably, yes. The steps we'd need to follow would be approximately the following:
cabal-modewithcabal.el, starting out as a copy ofhaskell-cabal.el.haskell-cabal-identifier prefixes tocabal-.(require 'haskell-utils)and figure out what would break. If anything, fix it if practical.cabalpackage on MELPA and/or ELPA.haskell-cabal.elfromhaskell-mode, and perhaps (though probably not) makehaskell-modedepend on thecabalpackage.This is also relevant to my interests, because I'm personally working with
haskell-ts-modeinstead ofhaskell-mode. However, I'm not working much with Haskell at the moment, so I'm unlikely to work on the above steps myself.webdevred commentedon Sep 8, 2025
I spent a lot of time writing code for my personal projects during the summer. Also it feels like haskell-mode is a big project, it is hard to get a good understanding of it, I dont know where to start. But I would love to get into haskell-mode and I would be like to help with this issue. I can create a new repo, in my account I guess since I dont have haskell organization permissions and separate the cabal mode into that and ping you when I am getting somewhere.
puff-paddy commentedon Sep 19, 2025
@webdevred how is it going with separating the cabal mode?
purcell commentedon Sep 22, 2025
That sounds good, @webdevred — ping me if you need anything, or when there's anything to show. In due course we could then fold it back into this org for community maintenance.
webdevred commentedon Sep 27, 2025
Hello @puff-paddy,
Update from my side:
So far I found three definitions in haskell-utils.el used by haskell-cabal.el, they are
haskell-mode-toggle-interactive-prompt-statealong with its toggle variablehaskell-mode-interactive-prompt-stateandhaskell-utils-read-directory-name.haskell-utils-read-directory-name, however is only used inhaskell-cabal-get-dir, a function which is not used insidehaskell-cabal.elbut it is used inhaskell-session.el.This is is example of where haskell-mode-toggle-interactive-prompt-state is used:
haskell-cabal-find-or-create-source-fileis bound to C-c C-f in the cabal mode.I plan to clean up my code and publish my code later, maybe tomorrow or during the coming week and proceed to make a package in melpa or elpa.
puff-paddy commentedon Oct 8, 2025
No worries, take your time
webdevred commentedon Oct 22, 2025
Update: I have published my cabal-mode package as a draft, we will probably discuss a bit how to improve it before merging it into melpa.
puff-paddy commentedon Nov 21, 2025
Since cabal mode has been merged to melpa thanks to @webdevred , are there plans to remove haskell-cabal.el and perhaps add cabal-mode as a dependency
webdevred commentedon Nov 21, 2025
I would be happy help with this part as well, if @purcell thinks we should do this.
purcell commentedon Nov 24, 2025
Yeah, it would make sense to remove
haskell-cabal.el. In a purist sense,haskell-modeshouldn't really depend on thecabal-modepackage. Over time,haskell-modehas turned into a big Haskell IDE bundle, which isn't super desirable IMO, and static package dependencies make it hard to swap out non-core portions.