Skip to content

Add Haskell examples for TESTed - #56

Merged
TomNaessens merged 1 commit into
masterfrom
feature/8847-tested-haskell-examples
Oct 19, 2026
Merged

TomNaessens merged 1 commit into
masterfrom
feature/8847-tested-haskell-examples

Conversation

@TomNaessens

@TomNaessens TomNaessens commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Adds Haskell examples for TESTed under tested/haskell/, one runnable Dodona exercise each, with tested/haskell/dirconfig.json setting the language. Each exercise shows one TESTed feature and is typical for the language; the exercises that one suite judges in every language (tested/echo-name, tested/smallest) are in #64.

Exercise Shows
factorial expression testing of a pure function (factorial :: Int -> Int)
sum-of-squares a list argument, solved with map and foldr (sumOfSquares :: [Int] -> Int)
sum-lines stdin/stdout with IO: interact reads numbers line by line and prints their sum

Descriptions in en and nl.

Part of https://github.com/dodona-edu/dodona/issues/8847.

Manual testing instructions

  1. In a Dodona dev checkout with seeded data, check out this branch in the local clone of the example repository under data/exercises/ (git fetch && git checkout feature/8847-tested-haskell-examples).
  2. Sign in as zeus (http://dodona.localhost:3000/dev_sign_in/1), open that repository's page and reprocess its activities.
  3. Open the Haskell exercises ("Factorial", "Sum of squares", "Sum of lines") and submit each one's solution/solution.hs: all tests pass.
  4. Edge case: in "Sum of squares", sum the numbers without squaring them: 3 of 4 tests fail.
Verification (dodona-authoring verify skill, ghcr.io/dodona-edu/dodona-tested, universal-judge master)

DSL validation passes for every suite. "en" and "nl" are full runs the way Dodona does them, with that natural_language.

Exercise Reference solution Wrong solution en nl
factorial 5/5 correct rejected (compilation error: no factorial) 5/5 5/5
sum-of-squares 4/4 correct rejected (compilation error: no sumOfSquares) 4/4 4/4
sum-lines 4/4 correct rejected (4 wrong) 4/4 4/4

🤖 Generated with Claude Code

@TomNaessens TomNaessens added the enhancement New feature or request label Oct 19, 2026
@TomNaessens TomNaessens self-assigned this Oct 19, 2026
@TomNaessens
TomNaessens force-pushed the feature/8847-tested-haskell-examples branch from 29f5429 to 51dd768 Compare October 19, 2026 16:25
@TomNaessens TomNaessens changed the title Add Haskell versions of the TESTed input-output and files examples Add Haskell examples for TESTed Oct 19, 2026
@TomNaessens
TomNaessens force-pushed the feature/8847-tested-haskell-examples branch from 51dd768 to 32f1ccc Compare October 19, 2026 16:40
@TomNaessens
TomNaessens marked this pull request as ready for review October 19, 2026 19:26
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@TomNaessens
TomNaessens force-pushed the feature/8847-tested-haskell-examples branch from 32f1ccc to 6d3fd73 Compare October 19, 2026 19:29
@TomNaessens
TomNaessens enabled auto-merge October 19, 2026 19:34
@TomNaessens
TomNaessens merged commit 9356d5e into master Oct 19, 2026
11 checks passed
@TomNaessens
TomNaessens deleted the feature/8847-tested-haskell-examples branch October 19, 2026 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants