Skip to content

Improve documentation, comment uniformity, and test coverage#74

Draft
Copilot wants to merge 3 commits intomasterfrom
copilot/improve-documentation-and-testing
Draft

Improve documentation, comment uniformity, and test coverage#74
Copilot wants to merge 3 commits intomasterfrom
copilot/improve-documentation-and-testing

Conversation

Copy link
Contributor

Copilot AI commented Mar 13, 2026

Addresses the open items from the documentation and testing issue: uniform inline comments, extended metacommand test coverage, and subdirectory READMEs.

Comment uniformity

  • Fixed typo singlasingle and missing period in IMP/Lexer.hs
  • Removed dead commented-out code in REPL/State.hs
  • Capitalized all -- INFO: / -- CHECK: comment bodies consistently across the codebase (14 occurrences)
  • Added missing periods to Haddock doc comments in REPL/Execute/Browser.hs

Test suite — metacommand parse & execution (60 → 102 tests)

Added REPL.Meta, REPL.Preset, and REPL.State as other-modules (+ Paths_impli autogen) in the test suite to enable REPL-level testing without touching the library API.

Two new test groups in test/Spec.hs:

  • metaParseTests — 33 cases covering all Command variants (including single-letter abbreviations), Aspect, Option, Level, and Element parsing via parser "test" input @?= Right expected
  • metaExecTests — 10 cases running reset/set actions through the REPL IO monad and asserting the resulting Store fields

Subdirectory READMEs

File Contents
src/IMP/README.md Module table + lexer→parser→semantics pipeline diagram
src/IMP/Semantics/README.md Natural vs. structural semantics, function signatures, tradeoffs
src/REPL/README.md REPL m monad structure, dispatch flow, metacommand overview
src/REPL/Execute/README.md Native (haskeline/InputT IO) vs. browser (WASM FFI/IO) backend comparison
web/src/README.md Frontend source files (App.tsx, impli.ts, util.ts, Unsupported.tsx) and WASM startup flow
Original prompt

This section details on the original issue you should resolve

<issue_title>Improve documentation and testing</issue_title>
<issue_description>- [x] Typst paper of implemented derivation rules
- [x] docs/IMP.typ compiled to docs/IMP.pdf with GitHub action in build workflow on push that changes the source file
- [x] Add docs/IMP.pdf to .cabal extra docs files

  • Refine Haddock documentation comments
  • General comments
  • Extend test suite
    • Also test metacommands' parse and execution
  • Add READMEs to relevant subdirectories in src/ and web/
    • For instance in Semantics/, REPL/, IMP/, etc. </issue_description>

Comments on the Issue (you are @copilot in this section)

@bfeitknecht Make comments uniform. Capitalization, punctuation.

💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.

…dd READMEs

Co-authored-by: bfeitknecht <114588139+bfeitknecht@users.noreply.github.com>
Copilot AI changed the title [WIP] Improve documentation and testing Improve documentation, comment uniformity, and test coverage Mar 13, 2026
Copilot AI requested a review from bfeitknecht March 13, 2026 22:11
@bfeitknecht
Copy link
Owner

@copilot Also add a README to web/.

Co-authored-by: bfeitknecht <114588139+bfeitknecht@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Mar 14, 2026

@copilot Also add a README to web/.

Added web/src/README.md in dbb2fce, covering the four source files (App.tsx, impli.ts, util.ts, Unsupported.tsx), the WASM startup flow, and a link back to the top-level web/README.md for build/deploy details.

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.

Improve documentation and testing

2 participants