Contributing to Elara
Thank you for your interest in contributing to Elara! This guide will help you get started.Getting Started
Prerequisites
To build Elara, you’ll need:- GHC 9.10.1+ - The Glasgow Haskell Compiler
- Cabal 3.8+ or Stack - Haskell build tools
- JDK 8+ - For running compiled Elara programs
- Nix (optional) - For reproducible builds
Building from Source
Running the Compiler
Development Workflow
Project Structure
Coding Standards
Haskell Style
Haskell Style
- Use fourmolu for formatting:
fourmolu -i src/ - Follow hlint suggestions:
hlint src/ - Maximum line length: 120 characters
- Use explicit type signatures for top-level definitions
Documentation
Documentation
- Add Haddock comments to all exported functions
- Include examples in documentation where appropriate
- Document why, not just what
Testing
Testing
- Add tests for all new features
- Use golden tests for compiler output
- Property tests for pure functions when applicable
Making Changes
Commit Your Changes
feat:- New featurefix:- Bug fixdocs:- Documentation changesrefactor:- Code refactoringtest:- Test additions/changes
Areas for Contribution
High Priority
Standard Library
Standard Library
Expand the Elara standard library:
- Data structures (Map, Set, etc.)
- String manipulation
- File I/O
- Networking (HTTP, etc.)
Tooling
Tooling
- Language Server Protocol (LSP) - IDE support
- Package Manager - Dependency management
- REPL - Interactive environment
- Formatter - Code formatting tool
Optimizations
Optimizations
- Tail call optimization
- Inline small functions
- Specialize polymorphic functions
- Better closure representation
Language Features
Language Features
- Type classes (in progress)
- Type aliases (done, but could be improved)
- Module system improvements
- Records with row polymorphism (partially done)
Good First Issues
Look for issues labeled “good first issue” on GitHub:- Improve error messages
- Add examples to documentation
- Fix compiler warnings
- Add golden tests for edge cases
Testing
Running Tests
Golden Tests
Elara uses golden tests to verify compiler output:Adding New Tests
- Create a test file in
test/ - Write test cases using Hspec
- Add the test module to
elara.cabal
Documentation
Adding Documentation
Documentation is written in MDX (Markdown + JSX) and lives in this repository:Documentation Types
- Tutorials: Step-by-step guides for beginners
- How-To Guides: Solutions to specific problems
- Reference: Technical documentation of language features
- Explanations: Conceptual discussions
Community
Getting Help
Discord Server
Discord Server
Join the Elara Discord for:
- Questions about contributing
- Discussions on language design
- Real-time help with development
GitHub Discussions
GitHub Discussions
Use GitHub Discussions for:
- Feature proposals
- Design discussions
- Show and tell
GitHub Issues
GitHub Issues
Use GitHub Issues for:
- Bug reports
- Feature requests
- Task tracking
Code Review
All contributions go through code review:- Be respectful and constructive
- Respond to review comments promptly
- Don’t take criticism personally
- Ask questions if something is unclear
Core maintainers will review your PR within a few days. Feel free to ping if you haven’t heard back!
Contributor License Agreement
By contributing to Elara, you agree that your contributions will be licensed under the MIT License.Recognition
Contributors are recognized in:- The CHANGELOG.md
- GitHub’s contributor graph
- Special thanks in release notes
Questions?
If you have any questions not covered here:- Ask on Discord
- Open a GitHub Discussion
- Email the maintainers (see README.md)