haskell / haskell/haskell-language-server

Feature Request: Add current file to Cabal (exposed/other) modules

Open
#3,595 4 comments 4 reactions 1 assignee Claimed by @VeryMilkyJoe View on GitHub
component: hls-cabal-plugin type: enhancement
Dominant language
Haskell
Stars
3k
Forks
455
Avg merge
2d 19h
Merged PRs (30d)
11

Description

**Is your feature request related to a problem? Please describe.**

Adding all project modules to the Cabal file is often confusing for newcomers, if we could add them automatically, it'd be a win.

**Describe the solution you'd like**

When a module in the project is opened and it is not mentioned in the Cabal file, it should be added automatically to the `other-modules` section.

This would be a quick boost of productivity, so the developer would only need to move the module to `exposed-modules` if they want to expose it.

An alternative would be to add a command to the extension to achieve this on demand.

**Describe alternatives you've considered**

Using/creating a CLI file just for this

**Additional context**

In F# Ionide this is done through an additional file explorer view, which is overkill in my opinion. Still, it frees the dev from having to mess around with tooling.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.