This project is a Maven multi-module build that separates annotations, the annotation processor, and examples. The compiler generates boilerplate methods based on minimal implementations declared with annotations.
functional-by-annotations/
├── functional-definitions/ (aggregator)
│ ├── annotation-definitions/ (annotations + interfaces)
│ └── functional-compiler/ (annotation processor)
├── example-functional/ (sample data types + tests)
└── jacoco-functional/ (coverage aggregation)
Source Types
│ @Functor/@Monad/@Monoid...
▼
functional-compiler (annotation processor)
│ validates minimal methods
│ generates derived methods
▼
Generated code compiled with user sources
annotation-definitions
▲
│
functional-compiler
▲
│
example-functional
│
▼
jacoco-functional
Notes:
functional-compilerdepends onannotation-definitions.example-functionaluses annotations and the compiler for generated code.jacoco-functionalaggregates coverage from examples and compiler.
Keeping annotation-definitions independent allows users to reference annotations without pulling in compiler internals.
The compiler generates boilerplate (for example map, fapply, flatMap) based on minimal method requirements for each structure.
Java modules enforce clean API boundaries and prevent accidental package exposure.
IMonad -> IApplicative -> IFunctor
IMonoid -> ISemigroup
ITraversal -> IFunctor + IFoldable
IAlternative -> IApplicative
IRing -> ISemigroup (addition) + ISemigroup (multiplication)
- Annotation definitions:
functional-definitions/annotation-definitions - Annotation processor:
functional-definitions/functional-compiler - Example implementations:
example-functional - CI/CD:
.github/workflows