Skip to content

Modernize v2#1

Merged
nebasuke merged 9 commits intomasterfrom
modernize-v2
Feb 8, 2026
Merged

Modernize v2#1
nebasuke merged 9 commits intomasterfrom
modernize-v2

Conversation

@nebasuke
Copy link
Owner

@nebasuke nebasuke commented Feb 8, 2026

Summary

  • Convert docs to markdown and remove Setup.hs
  • Fix groundedF infinite loop — apply f at each step
  • Modernize to cabal 3.0, rewrite CLI with optparse-applicative, fix -Wall warnings
  • Add tasty test suite, QuickCheck properties, and GitHub Actions CI
  • Add pretty print for doctests

…all warnings

- Rewrite Dung.cabal for cabal-version 3.0, update dependency bounds
- Move Main.hs from src/ to app/, rewrite CLI (cmdargs → optparse-applicative)
- Fix all -Wall warnings (unused bindings, redundant patterns, shadowing)
- Add Language.Dung re-export module
- Export isGrounded from Language.Dung.AF
- Bump version to 2.0.0.0
@nebasuke nebasuke requested a review from Copilot February 8, 2026 00:11
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Modernizes the Dungell project by updating packaging/docs, fixing a grounded semantics bug, replacing the legacy CLI implementation, and adding automated tests/CI.

Changes:

  • Fixed groundedF to apply the characteristic function at each iteration (avoids infinite loop).
  • Replaced the cmdargs CLI with an optparse-applicative-based executable and updated Cabal metadata to v3.0 format.
  • Added Tasty (HUnit + QuickCheck) and doctest test suites plus a GitHub Actions CI workflow.

Reviewed changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/Language/Dung/AF.hs Fixes groundedF and refactors internals; adjusts exports and warning handling.
src/Language/Dung/Input.hs Cleans up parser code to avoid warnings and improve clarity.
app/Main.hs New optparse-applicative CLI implementation replacing the removed src/Main.hs.
Dung.cabal Cabal 3.0 modernization; adds test suites and updated dependencies.
test/Main.hs New Tasty test runner aggregating module tests.
test/Test/Language/Dung/AF.hs Adds HUnit tests for AF operations and semantics.
test/Test/Language/Dung/Input.hs Adds HUnit tests for parsing and round-tripping AF I/O.
test/Test/Language/Dung/Properties.hs Adds QuickCheck properties for semantic consistency.
test/Doctest.hs Adds doctest runner for source examples.
.github/workflows/ci.yml Adds CI to build and run tests across multiple GHC versions.
README.md Converts docs to Markdown and documents updated library/executable usage.
CHANGELOG.md Adds a Markdown changelog describing breaking changes and improvements.
Setup.hs / README.txt / CHANGELOG / src/Main.hs Removes legacy build script, docs, changelog, and old CLI implementation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Add a printList helper in a doctest $setup block to format multi-line
list output readably (one element per line) so doctests match actual
GHC output. Pass -package containers and -package parsec to doctest
so library modules load correctly. Fix groundedExt expected output
spacing and remove erroneous trailing commas in single-element lists.

Also remove -Wno-name-shadowing pragma from AF.hs and improve
expectRight helper in tests to show parse errors on failure.
Include LICENSE in extra-source-files so it is browsable on Hackage
package candidates. Update copyright year in LICENSE to 2014-2026.
@nebasuke nebasuke merged commit 19d7146 into master Feb 8, 2026
4 checks passed
@nebasuke nebasuke deleted the modernize-v2 branch February 8, 2026 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants