haskell / haskell/haskell-mode

Compile stack projects without .cabal file

Open
#1,610 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Emacs Lisp
Stars
1.4k
Forks
354
Avg merge
5d 10h
Merged PRs (30d)
2

Description

[`haskell-compile`](https://github.com/haskell/haskell-mode/blob/dd0ea640fa449d021399a17db65e4d50d3f0f2a9/haskell-compile.el#L115) doesn't currently detect projects unless it finds a `.cabal` file, so it doesn't work with projects using hpack.
It would be cool if it ran `stack build` in those cases.
An easy way to check whether something is in a stack project is by running `stack path --project-root` but I don't think I know enough elisp to implement it.

Note: Issue #1527 is similar, but it seems to me they're going for a more general solution. I just want an automatic "stack build".

Contributor guide

Open the contributing guide

Research direction

Start at haskell-compile.el around the haskell-compile entry point at line 115, and review how it detects a project from a .cabal file. Check the stack path --project-root approach described in the issue, then verify that a project without a .cabal file invokes stack build while existing project handling remains intact.

Written by the indexing model from the issue text.

Assessment

Tech stack
emacs-lisp, haskell
Domain
tooling
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.