Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 3 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,8 @@ on:
pull_request:
branches: [ main ]

permissions:
contents: read

jobs:
build:
name: Java ${{ matrix.java }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand All @@ -20,19 +16,16 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v4

- name: Set up Java
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: ${{ matrix.java }}
cache: gradle

- name: Set up Gradle
uses: gradle/actions/setup-gradle@v5
with:
gradle-version: '9.8.0'
uses: gradle/actions/setup-gradle@v4

- name: Verify
run: gradle clean check javadoc
run: ./gradlew clean check javadoc
20 changes: 1 addition & 19 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,29 +1,11 @@
.gradle/
build/
out/
*.class

# IntelliJ IDEA
.idea/
*.iws
*.iml
*.ipr

# Eclipse
.classpath
.project
.settings/
bin/

# NetBeans
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/

# VS Code
.vscode/

# OS files
.DS_Store
Thumbs.db
86 changes: 52 additions & 34 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,49 +1,67 @@
# Changelog

All notable changes to this project are documented in this file.
All notable changes to the project are documented in this file.

The project follows an incremental milestone model. Version 0.1 is treated as the original proof of concept; 0.1.1 is its first hardened release.

## [0.1.1] - 2026-09-30
## 0.2.0 — Basic Algebraic Typeclasses

### Added

- Java 21 toolchain baseline.
- `Show<A>` as the minimal first-order typeclass contract.
- `TypeClassFunctions.show(...)` demonstrating explicit dictionary passing.
- `StringInstances`, `IntegerInstances`, and `LocalDateInstances`.
- `Person` example record with domain validation.
- compact and verbose `Show<Person>` instances.
- executable `ShowExample`.
- JUnit tests for the core API, standard instances, domain validation, and multiple-instance behaviour.
- JaCoCo report generation.
- sources JAR and Javadoc JAR generation.
- GitHub Actions build matrix for Java 21, 25, and 27.
- `docs/ARCHITECTURE.md`.
- `docs/TYPECLASSES.md`.
- `docs/ROADMAP.md`.
- Apache License 2.0.
- `Eq<A>` with derived inequality support.
- `Ord<A>` extending `Eq<A>` with comparison, ordering predicates, minimum and maximum.
- `Semigroup<A>` representing associative combination.
- `Monoid<A>` extending `Semigroup<A>` with an identity element.
- Dedicated `ShowFunctions`, `EqFunctions`, `OrdFunctions`, `SemigroupFunctions`, and `MonoidFunctions` syntax helpers.
- Integer equality, ordering, addition monoid and multiplication monoid.
- String equality, case-sensitive and case-insensitive ordering, and concatenation monoid.
- `LocalDate` equality and chronological ordering.
- Immutable-style generic list concatenation monoid.
- Multiple `Eq<Person>` and `Ord<Person>` instances.
- Executable examples for equality, ordering, semigroup and monoid usage.
- Focused tests for all new typeclasses, syntax helpers and instance families.
- `docs/ALGEBRA.md`.
- Detailed milestone 0.2 implementation task list.

### Changed

- Replaced the original GitLab template README with project-specific documentation.
- Renamed the Gradle root project to `java-typeclasses`.
- Changed the Gradle plugin from `java` to `java-library`.
- Set project version to `0.1.1`.
- Updated the Gradle wrapper configuration target from Gradle 8.2 to 9.8.0.
- Standardised source packages under `io.codeswarm.typeclasses`.
- Separated reusable core abstractions, platform instances, and educational examples.
- Enabled compiler linting and UTF-8 consistently.
- Project version advanced from `0.1.1` to `0.2.0`.
- Generic helper architecture changed from one growing `TypeClassFunctions` class to one small syntax class per typeclass family.
- `ShowExample` now uses `ShowFunctions`.
- README now documents the complete basic algebra model and multiple-instance examples.
- Architecture, typeclass documentation and roadmap were updated for milestone 0.2.
- CI verification now runs `clean check javadoc` for Java 21, 25 and 27.

### Removed

- Placeholder GitLab onboarding documentation.
- Legacy/unused source structure from the proof-of-concept milestone.
- Unused IDE/build artefacts and obsolete generated files from the milestone source tree.
- Premature abstractions not required to explain milestone 0.1.1.
- `TypeClassFunctions`, superseded by focused syntax helpers.
- The old aggregated tests from 0.1.1 that were replaced by smaller type-specific test classes.
- No obsolete pre-hardening scripts, generated build output or IDE files are included in the source distribution.

### Design notes

- Typeclass instances remain independent from domain classes.
- Instance dependencies are passed explicitly.
- No reflection, service locator, registry, dependency-injection framework, HKT encoding, or automatic derivation is introduced in this release.
- Domain types remain unaware of their typeclass instances.
- Instance selection remains explicit; no registry, reflection or automatic resolution was introduced.
- `Ord<A>` refines `Eq<A>` and `Monoid<A>` refines `Semigroup<A>`.
- Algebraic laws are documented but systematic property-based verification is intentionally deferred to milestone 0.3.
- HKT, ADTs, `Functor`, `Applicative` and `Monad` remain out of scope for YAGNI reasons.

## 0.1.1 — Foundation Hardening

### Added

- Java 21 toolchain baseline.
- `Show<A>` as the minimal typeclass example.
- Explicit dictionary-passing helper.
- Standard Show instances for Integer, String and LocalDate.
- Person example with compact and verbose rendering instances.
- Unit tests, JaCoCo reporting, Javadoc generation and GitHub Actions CI.
- Architecture, typeclass, roadmap and implementation documentation.
- Apache License 2.0.

### Changed

- Reorganized the original prototype into coherent `core`, `instances` and `examples` packages.
- Replaced the placeholder GitLab README with project-specific documentation.

## 0.1 — Original Prototype

Initial repository state, subsequently treated as milestone 0.1.
Loading
Loading