fix: C backend String functions, record type aliases, docs cleanup

- Add String.fromChar, chars, substring, toUpper, toLower, replace,
  startsWith, endsWith, join to C backend
- Fix record type alias unification by adding expand_type_alias and
  unify_with_env functions
- Update docs to reflect current implementation status
- Clean up outdated roadmap items and fix inconsistencies
- Add comprehensive language comparison document

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-02-16 01:06:20 -05:00
parent ba3b713f8c
commit 33b4f57faf
11 changed files with 1694 additions and 571 deletions

View File

@@ -14,8 +14,8 @@
| Runtime versioned values | ✅ Complete |
| Schema registry & compatibility checking | ✅ Complete |
| Basic migration execution | ✅ Complete |
| Type system integration | ⚠️ Partial (versions ignored in typechecker) |
| Auto-migration generation | ❌ Missing |
| Type system integration | ✅ Complete |
| Auto-migration generation | ✅ Complete |
| Serialization/codec support | ❌ Missing |
### Behavioral Types
@@ -24,10 +24,11 @@
| Parser (`is pure`, `is total`, etc.) | ✅ Complete |
| AST & PropertySet | ✅ Complete |
| Pure function checking (no effects) | ✅ Complete |
| Total verification | ❌ Missing |
| Idempotent verification | ❌ Missing |
| Deterministic verification | ❌ Missing |
| Where clause enforcement | ❌ Missing |
| Total verification (no Fail, structural recursion) | ✅ Complete |
| Idempotent verification (pattern-based) | ✅ Complete |
| Deterministic verification (no Random/Time) | ✅ Complete |
| Commutative verification (2 params, commutative op) | ✅ Complete |
| Where clause property constraints | ✅ Complete |
---
@@ -49,9 +50,9 @@
| Task | Priority | Effort | Status |
|------|----------|--------|--------|
| SQL effect (query, execute) | P1 | 2 weeks | ❌ Missing |
| SQL effect (query, execute) | P1 | 2 weeks | ✅ Complete |
| Transaction effect | P2 | 1 week | ✅ Complete |
| Connection pooling | P2 | 1 week | ❌ Missing |
| Transaction effect | P2 | 1 week | ❌ Missing |
### Phase 1.3: Web Server Framework
@@ -66,7 +67,7 @@
| Task | Priority | Effort | Status |
|------|----------|--------|--------|
| Elm-quality error messages | P1 | 2 weeks | ⚠️ Partial (context shown, suggestions missing) |
| Elm-quality error messages | P1 | 2 weeks | ✅ Complete (field suggestions, error categories) |
| Full JS compilation | P2 | 4 weeks | ✅ Complete |
| Hot reload / watch mode | P2 | — | ✅ Complete |
| Debugger improvements | P3 | 2 weeks | ✅ Basic |
@@ -88,15 +89,16 @@
| Task | Priority | Effort | Status |
|------|----------|--------|--------|
| Total function verification | P1 | 2 weeks | ❌ Missing |
| Idempotent verification | P1 | 2 weeks | ❌ Missing |
| Deterministic verification | P1 | 1 week | ❌ Missing |
| Where clause enforcement | P1 | 1 week | ❌ Missing |
| Total function verification | P1 | 2 weeks | ✅ Complete |
| Idempotent verification | P1 | 2 weeks | ✅ Complete |
| Deterministic verification | P1 | 1 week | ✅ Complete |
| Where clause enforcement | P1 | 1 week | ✅ Complete |
**Implementation approach:**
- **Total:** Restrict to structural recursion, require termination proof for general recursion
- **Idempotent:** Pattern-based (setter patterns, specific effect combinations)
- **Deterministic:** Effect analysis (no Random, Time, or non-deterministic IO)
**Implementation approach (completed):**
- **Total:** Checks for no Fail effect + structural recursion for termination
- **Idempotent:** Pattern-based recognition (constants, identity, clamping, abs, projections)
- **Deterministic:** Effect analysis (no Random or Time effects)
- **Commutative:** Requires 2 params with commutative operation (+, *, min, max, etc.)
### Phase 2.2: Refinement Types (Stretch Goal)
@@ -130,10 +132,10 @@
| Task | Priority | Effort | Status |
|------|----------|--------|--------|
| Type system version tracking | P1 | 1 week | ⚠️ Partial |
| Auto-migration generation | P1 | 2 weeks | ❌ Missing |
| Version compatibility errors | P1 | 1 week | ❌ Missing |
| Migration chain optimization | P2 | 1 week | ⚠️ Basic |
| Type system version tracking | P1 | 1 week | ✅ Complete |
| Auto-migration generation | P1 | 2 weeks | ✅ Complete |
| Version compatibility errors | P1 | 1 week | ✅ Complete |
| Migration chain optimization | P2 | 1 week | ✅ Complete |
### Phase 3.2: Serialization Support
@@ -205,7 +207,7 @@
|------|----------|--------|--------|
| Package manager (lux pkg) | P1 | 3 weeks | ✅ Complete |
| Module loader integration | P1 | 1 week | ✅ Complete |
| Package registry | P2 | 2 weeks | ❌ Missing |
| Package registry | P2 | 2 weeks | ✅ Complete (server + CLI commands) |
| Dependency resolution | P2 | 2 weeks | ❌ Missing |
**Package Manager Features:**
@@ -219,8 +221,8 @@
| Task | Priority | Effort | Status |
|------|----------|--------|--------|
| LSP completions | P1 | 1 week | ⚠️ Basic |
| LSP go-to-definition | P1 | 1 week | ⚠️ Partial |
| LSP completions | P1 | 1 week | ✅ Complete (module-specific completions) |
| LSP go-to-definition | P1 | 1 week | ✅ Complete (functions, lets, types) |
| Formatter | P2 | — | ✅ Complete |
| Documentation generator | P2 | 1 week | ❌ Missing |
@@ -253,21 +255,21 @@
3. ~~**File effect**~~ ✅ Done
4. ~~**HTTP client effect**~~ ✅ Done
5. ~~**JSON support**~~ ✅ Done
6. **Elm-quality errors** — ⚠️ In progress
6. ~~**Elm-quality errors**~~ ✅ Done
### Quarter 2: Backend Services (Use Case 1)
### Quarter 2: Backend Services (Use Case 1) ✅ COMPLETE
7. **HTTP server effect** — Build APIs
8. **SQL effect** Database access
9. **Full JS compilation** Deployment
10. **Package manager** — Code sharing
7. ~~**HTTP server effect**~~ ✅ Done
8. ~~**SQL effect**~~ Done
9. ~~**Full JS compilation**~~ Done
10. ~~**Package manager**~~ ✅ Done
### Quarter 3: Reliability (Use Case 2)
### Quarter 3: Reliability (Use Case 2) ✅ COMPLETE
11. **Behavioral type verification** — Total, idempotent, deterministic
12. **Where clause enforcement** — Type-level guarantees
13. **Schema evolution completion** — Version tracking in types
14. **Auto-migration generation** — Reduce boilerplate
11. ~~**Behavioral type verification**~~ ✅ Done
12. ~~**Where clause enforcement**~~ ✅ Done
13. ~~**Schema evolution completion**~~ ✅ Done
14. ~~**Auto-migration generation**~~ ✅ Done
### Quarter 4: Polish (Use Cases 3 & 4)
@@ -322,9 +324,9 @@
- ✅ Watch mode
- ✅ Debugger (basic)
**Advanced (Parsing Only):**
- ✅ Schema evolution (parsing, runtime values)
- ✅ Behavioral types (parsing, pure checking only)
**Advanced:**
- ✅ Schema evolution (parser, runtime, migrations, compatibility checking)
- ✅ Behavioral types (pure, total, idempotent, deterministic, commutative verification)
---