feat: add schema evolution type system integration and HTTP server effect
Schema Evolution: - Preserve version info in type resolution (Type::Versioned) - Track versioned type declarations in typechecker - Detect version mismatches at compile time (@v1 vs @v2 errors) - Support @v2+ (at least) and @latest version constraints - Store migrations for future auto-migration support - Fix let bindings to preserve declared type annotations HTTP Server Effect: - Add HttpServer effect with listen, accept, respond, respondWithHeaders, stop - Implement blocking request handling via tiny_http - Request record includes method, path, body, headers - Add http_server.lux example with routing via pattern matching - Add type-checking test for HttpServer effect Tests: 222 passing (up from 217) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -128,10 +128,16 @@ let content = File.read("config.txt")
|
||||
File.write("output.txt", "Hello!")
|
||||
let exists = File.exists("file.lux")
|
||||
|
||||
// HTTP effects
|
||||
// HTTP client effects
|
||||
let response = Http.get("https://api.example.com/data")
|
||||
Http.post("https://api.example.com/submit", "{\"key\": \"value\"}")
|
||||
|
||||
// HTTP server effects
|
||||
HttpServer.listen(8080)
|
||||
let req = HttpServer.accept() // Returns { method, path, body, headers }
|
||||
HttpServer.respond(200, "Hello, World!")
|
||||
HttpServer.stop()
|
||||
|
||||
// Random effects
|
||||
let n = Random.int(1, 100)
|
||||
let coin = Random.bool()
|
||||
|
||||
Reference in New Issue
Block a user