Thank you for your interest in Osgiliath — the formal Haskell backbone for Arthedain's Hyperdimensional Computing engine.
We are committed to fostering an open and welcoming environment. All contributors must adhere to our code of conduct: be respectful, constructive, and inclusive.
- Bug reports: Open a GitHub issue with a minimal reproduction, expected vs. actual behaviour, and your GHC/cabal version.
- Feature requests: Describe the use case, why it matters for HDC, and how it connects to Arthedain's Python library.
- Documentation: Typos, missing haddock, unclear explanations — all welcome.
- Fork the repository and create a feature branch from
main. - Write tests for any new functionality. We use:
tasty+tasty-hunitfor unit teststasty-quickcheckfor property-based tests
- Ensure all tests pass:
cabal test all - Run hlint and address warnings:
hlint src/ tests/ - Update haddock documentation for any public API changes.
- Open a PR with a clear description of the change and its motivation.
# Install GHC and cabal via ghcup
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh
# Clone and build
git clone https://github.com/Enotrium/Osgiliath.git
cd Osgiliath
cabal build all
# Run tests
cabal test allOsgiliath/
├── clash-hdc/ # Type-Safe Hardware HDC Generator (Clash)
├── hdc-theory/ # Category-Theoretic Formal Foundation
├── hdc-compiler/ # Verified Multi-Backend HDC DSL
├── hdc-quickcheck/ # Formal Property Testing Framework
└── cabal.project # Monorepo build file
- Language: Haskell 2010 with GHC 9.6+ extensions (DataKinds, GADTs, TypeFamilies, etc.)
- Style: Follow the style of existing modules. Use explicit imports.
- Documentation: Every module must have a haddock header. Public functions must have type signatures and documentation.
- Tests: Every package has a
tests/Test.hstest suite. Add new properties to the appropriate package. - Safety: Use
-Wall -Wincomplete-patternsflags. Avoid partial functions. PreferMaybe/Eitherover exceptions.
hdc-theoryhas no internal dependencies (foundation layer)hdc-compilerdepends onhdc-theoryhdc-quickcheckdepends onhdc-theoryclash-hdcis standalone (Clash-specific)
By contributing, you agree that your contributions will be licensed under the BSD 3-Clause License (same as the rest of the project).