Add Random and Time effects for random number generation and time-based operations. These effects can be used in any effectful code block. Random effect operations: - Random.int(min, max) - random integer in range [min, max] - Random.float() - random float in range [0.0, 1.0) - Random.bool() - random boolean Time effect operations: - Time.now() - current Unix timestamp in milliseconds - Time.sleep(ms) - sleep for specified milliseconds Changes: - Add rand crate dependency - Add Random and Time effect definitions to types.rs - Add effects to built-in effects list in typechecker - Implement effect handlers in interpreter - Add 4 new tests for Random and Time effects - Add examples/random.lux demonstrating usage Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
22 lines
420 B
TOML
22 lines
420 B
TOML
[package]
|
|
name = "lux"
|
|
version = "0.1.0"
|
|
edition = "2021"
|
|
description = "A functional programming language with first-class effects, schema evolution, and behavioral types"
|
|
license = "MIT"
|
|
|
|
[dependencies]
|
|
rustyline = "14"
|
|
thiserror = "1"
|
|
lsp-server = "0.7"
|
|
lsp-types = "0.94"
|
|
serde = { version = "1", features = ["derive"] }
|
|
serde_json = "1"
|
|
rand = "0.8"
|
|
|
|
[dev-dependencies]
|
|
tempfile = "3"
|
|
|
|
[profile.release]
|
|
lto = true
|