docs: update documentation to match current implementation

- SKILLS.md: Update roadmap phases with actual completion status
  - Phase 0-1 complete, Phase 2-5 partial, resolved design decisions
- OVERVIEW.md: Add HttpServer, Test effect, JIT to completed features
- ROADMAP.md: Add HttpServer, Process, Test effects to done list
- VISION.md: Update Phase 2-3 tables with current status
- guide/05-effects.md: Add Time, HttpServer, Test to effects table
- guide/09-stdlib.md: Add HttpServer, Time, Test effect docs
- reference/syntax.md: Fix interpolation syntax, remove unsupported literals
- testing.md: Add native Test effect documentation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-02-14 02:56:42 -05:00
parent c81349d82c
commit 8c7354131e
8 changed files with 220 additions and 93 deletions

View File

@@ -48,9 +48,12 @@ Lux provides several built-in effects:
| `Fail` | `fail` | Early termination |
| `State` | `get`, `put` | Mutable state |
| `Random` | `int`, `float`, `bool` | Random numbers |
| `File` | `read`, `write`, `exists` | File system |
| `Process` | `exec`, `env`, `args` | System processes |
| `Time` | `now`, `sleep` | Time operations |
| `File` | `read`, `write`, `exists`, `delete`, `list`, `mkdir` | File system |
| `Process` | `exec`, `env`, `args`, `cwd`, `exit` | System processes |
| `Http` | `get`, `post`, `put`, `delete` | HTTP client |
| `HttpServer` | `listen`, `accept`, `respond`, `stop` | HTTP server |
| `Test` | `assert`, `assertEqual`, `assertTrue`, `assertFalse` | Testing |
Example usage:

View File

@@ -260,6 +260,34 @@ fn example(): Unit with {Http} = {
}
```
### HttpServer
```lux
fn example(): Unit with {HttpServer, Console} = {
HttpServer.listen(8080) // Start server on port
Console.print("Server listening on port 8080")
let req = HttpServer.accept() // Wait for request
// req is { method: String, path: String, body: String, headers: List<(String, String)> }
Console.print("Got " + req.method + " " + req.path)
HttpServer.respond(200, "Hello, World!") // Send response
HttpServer.stop() // Stop server
}
```
### Time
```lux
fn example(): Unit with {Time, Console} = {
let start = Time.now() // Current timestamp (milliseconds)
Time.sleep(1000) // Sleep for 1 second
let elapsed = Time.now() - start
Console.print("Elapsed: " + toString(elapsed) + "ms")
}
```
### Random
```lux
@@ -292,6 +320,24 @@ fn example(): Int with {Fail} = {
}
```
### Test
Native testing framework:
```lux
fn runTests(): Unit with {Test, Console} = {
Test.assert(1 + 1 == 2, "basic math")
Test.assertEqual(List.length([1,2,3]), 3, "list length")
Test.assertTrue(String.contains("hello", "ell"), "contains check")
Test.assertFalse(List.isEmpty([1]), "non-empty list")
}
// Run with test handler
fn main(): Unit with {Console} = {
run runTests() with { Test = testReporter }
}
```
## Quick Reference
| Module | Key Functions |
@@ -309,9 +355,12 @@ fn example(): Int with {Fail} = {
| File | read, write, exists, list, mkdir, delete |
| Process | exec, env, args, cwd, exit |
| Http | get, post, put, delete |
| HttpServer | listen, accept, respond, stop |
| Time | now, sleep |
| Random | int, float, bool |
| State | get, put |
| Fail | fail |
| Test | assert, assertEqual, assertTrue, assertFalse |
## Next