Repository navigation
feat(rules): Haskell dist-newstyle and .stack-work - #23
Merged
Merged
Conversation
Cabal builds into dist-newstyle, and `cabal clean` "cleans up the temporary files and build artifacts stored in the dist-newstyle folder" (https://cabal.readthedocs.io/en/stable/cabal-commands.html). Stack's work directory has "Default: .stack-work" and `stack clean --full` deletes it (https://docs.haskellstack.org/en/stable/configure/yaml/non-project/). Installed dependencies live in ~/.cabal and ~/.stack, so both folders are Safe: the next build recreates them. A project is a folder with cabal.project, stack.yaml or a *.cabal file. Adds haskell.toml to BUNDLED, a Cabal and a Stack match fixture, a nomatch fixture with neither, and the README table row. The rules-check snapshot counts 13 files and 36 artifacts.
Finjineersdev
force-pushed
the
rules-haskell
branch
from
December 1, 2026 09:53
63a19f1 to
5149ee3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a rule for Haskell projects (
cabal.project,stack.yamlor a*.cabalfile in the folder):dist-newstylecabal build.stack-workstack buildSources: each tool's own clean command removes the folder (
cabal clean,stack clean --full), and Stack documents.stack-workas the default work directory. Links are in the rule file and the issue.One point for review: a Git
source-repository-package(Cabal) or a Gitextra-dep(Stack) is checked out inside these folders, so the next build fetches it again. The build does that by itself with no user step, which is what Safe means inRULE-SCHEMA.md, but say if you would rather have Caution.Adds
haskell.tomltoBUNDLED, a Cabal and a Stack match fixture, a nomatch fixture with neither marker, and the README table row.Closes #22
How tested
rule_fixtures_produce_the_expected_candidatescovers the new fixtures.cargo test --locked148 passed, rules-check 13 rule files, 36 artifacts: ok (snapshot updated).Note: this and the Zig rule PR both add a line to
BUNDLED, the README table and the rules-check snapshot, so whichever merges second needs a small rebase.