Elara Roadmap
This roadmap outlines planned features and improvements for the Elara programming language. Elara is under active development, and priorities may shift based on community feedback and technical constraints.Current Status (v0.1.x)
Elara currently supports: ✅ Hindley-Milner type inference with let-polymorphism✅ Algebraic data types (sum and product types)
✅ Pattern matching with exhaustiveness checking
✅ First-class functions and closures
✅ JVM bytecode compilation
✅ Lightweight (indentation-based) syntax
✅ Module system with imports
✅ Type aliases (including recursive)
✅ Tuple types
✅ Basic IO monad
✅ Primitive operations (arithmetic, string manipulation)
Short Term (Next 3-6 Months)
Type Classes
Status: In Progress
Status: In Progress
Implement a type class system for ad-hoc polymorphism:Challenges:
- Dictionary passing for type class methods
- Superclasses and default methods
- Coherence (no overlapping instances)
Standard Library Expansion
Status: Ongoing
Status: Ongoing
Expand the Elara standard library with commonly-used modules:
- Data.List - List operations (map, filter, fold, etc.)
- Data.Map - Associative maps
- Data.Set - Sets
- Data.String - String manipulation
- System.IO - File I/O operations
- System.Environment - Environment variables, command-line args
- ✅ Basic list operations (map, filter, foldl, foldr)
- ✅ String operations (cons, head, tail, isEmpty)
- 🔄 Result type for error handling
- 🔄 Tuple utilities
- ❌ Map/Set implementations
- ❌ File I/O
Error Message Improvements
Status: Ongoing
Status: Ongoing
Continuously improve compiler error messages:Recent improvements:
- ✅ Better type mismatch errors with inference context
- ✅ Constructor arity mismatch errors
- ✅ Clearer pattern match errors
- More helpful “did you mean?” suggestions
- Show type variable constraints in errors
- Better error spans (highlight exact problem location)
- Suggest imports when name is not in scope
Medium Term (6-12 Months)
Tail Call Optimization
Status: Planned
Status: Planned
Eliminate tail calls to prevent stack overflow in recursive functions:Approach:
- Detect tail-recursive functions
- Transform to while loops in JVM bytecode
- Support mutual tail recursion
Language Server Protocol (LSP)
Status: Planned
Status: Planned
Implement an LSP server for IDE integration:Features:
- Syntax highlighting
- Autocomplete
- Go to definition
- Find references
- Inline type information
- Error diagnostics
- Code actions (e.g., “add import”)
- VS Code (priority)
- IntelliJ IDEA
- Vim/Neovim
- Emacs
Module System Enhancements
Status: Planned
Status: Planned
Improve the module system:Planned features:
- Re-exports:
module X (module Y)exports everything from Y - Qualified re-exports:
module X (Y.foo) - Module signatures (for separate compilation)
- Private declarations (internal to module)
- First-class modules (ML-style)
- Module functors (parameterized modules)
Performance Optimizations
Status: Ongoing
Status: Ongoing
Optimize generated JVM bytecode:Completed:
- ✅ Type inference performance (300% speedup)
- ✅ Closure lifting
- Inline small functions
- Specialize polymorphic functions at call sites
- Unbox primitive types (avoid Integer wrapper)
- Optimize pattern matching (decision trees)
- Dead code elimination (more aggressive)
- Constant folding
Long Term (12+ Months)
Higher-Rank Types
Status: Research
Status: Research
Full support for rank-n types:Challenges:
- Bidirectional type checking
- Type inference with higher-rank types
- Integration with existing inference engine
Dependent Types (Experimental)
Status: Research
Status: Research
Explore limited dependent types:Challenges:
- Type-level computation
- Proof irrelevance
- Runtime type erasure vs. type information preservation
- JVM target limitations
Native Java Interop
Status: Planned
Status: Planned
Direct interoperability with Java libraries:Challenges:
- FFI syntax design
- Type mapping (Java generics ↔ Elara polymorphism)
- Null safety
- Exception handling
- Mutable state in pure language
Package Manager
Status: Planned
Status: Planned
Development of a package manager for Elara:Features:
- Package registry (similar to Hackage, npm)
- Dependency resolution
- Version management
- Build tool integration
- Private packages
- Packages defined by
elara.json - Semantic versioning
- Lock files for reproducible builds
Effect System
Status: Research
Status: Research
Explore algebraic effects and handlers:Benefits:
- More flexible than monads
- Composable effects
- Efficient implementation
- Type inference
- JVM implementation (continuation passing?)
- Effect polymorphism
Alternative Backends
Status: Research
Status: Research
Explore additional compilation targets:Potential targets:
- Native code (via LLVM)
- Better performance
- No JVM dependency
- Smaller binaries
- JavaScript (via Node.js or browser)
- Web development
- Isomorphic applications
- WebAssembly
- Browser and server
- Near-native performance
The JVM backend will remain the primary target for the foreseeable future.
Recent Milestones (Completed)
2024
- ✅ Query system integration (Rock) - Enables incremental compilation
- ✅ Closure lifting - Proper lambda lifting with environment capture
- ✅ ANF conversion - A-Normal Form for optimization
- ✅ Tuple types - First-class tuples with pattern matching
- ✅ Type aliases - Including recursive type aliases
- ✅ Module system - Hierarchical modules with imports
- ✅ Qualified imports - Import specific names from modules
- ✅ Improved pattern matching - Better compilation and exhaustiveness
- ✅ Core type checking - Verify correctness of Core IR
- ✅ JVM IR - High-level intermediate representation
- ✅ Lightweight syntax - Indentation-based layout
- ✅ Better error messages - Context-aware type errors
2023
- ✅ Initial compiler implementation
- ✅ Hindley-Milner type inference
- ✅ JVM bytecode generation
- ✅ Basic standard library
- ✅ Pattern matching
- ✅ Algebraic data types
Community Requests
Features requested by the community (not yet prioritized):- Do notation for monads
- List comprehensions
- Record updates (
{ person | age = 30 }) - Operator sections (
(+ 1),(1 +)) - Anonymous records/extensible records
- Type-directed name resolution
- Derive clauses (auto-generate type class instances)
- Partial application syntax sugar
Have a feature request? Open a GitHub Discussion or chat on Discord!
Contributing to the Roadmap
Interested in helping implement these features?- Check the contributing guide
- Look for issues tagged with the feature name
- Join the Discord to discuss implementation
- Open a PR with your changes!