Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .clusterfuzzlite/Dockerfile
63 changes: 59 additions & 4 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,13 +1,68 @@
# SPDX-License-Identifier: MPL-2.0
# .editorconfig — RSR standard editor configuration
# .editorconfig — editor settings for the languages this repository actually
# contains. Deliberately not a generic estate template: the sections below
# track `git ls-files`, so a language that is not present does not get a rule.

root = true

[*]
indent_style = space
indent_size = 2
charset = utf-8
end_of_line = lf
trim_trailing_whitespace = true
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

# Trailing whitespace is significant here (Markdown hard line breaks,
# AsciiDoc continuations), so leave it alone.
[*.{md,adoc}]
trim_trailing_whitespace = false

# ── WokeLang itself ────────────────────────────────────────────────────────
[*.{woke,wl}]
indent_size = 4

[*.ebnf]
indent_size = 2

# ── Rust: the primary toolchain (src/) ─────────────────────────────────────
[*.rs]
indent_size = 4

# ── OCaml: the reference core (core/), incl. ocamllex/menhir ───────────────
[*.{ml,mli,mll,mly}]
indent_size = 2

[{dune,dune-project,*.opam}]
indent_size = 1

# ── Proof assistants ───────────────────────────────────────────────────────
[*.lean]
indent_size = 2

[*.v]
indent_size = 2

[*.{idr,ipkg}]
indent_size = 2

# ── Configuration and data ─────────────────────────────────────────────────
[*.{toml,yml,yaml,json,jsonl,ncl,a2ml}]
indent_size = 2

# Guile / Guix
[*.scm]
indent_size = 2

# ── Shell, recipes, TeX ────────────────────────────────────────────────────
[*.sh]
indent_size = 2

[{Justfile,Mustfile,*.just}]
indent_size = 4

[Makefile]
indent_style = tab

[*.{tex,bib}]
indent_size = 2
112 changes: 67 additions & 45 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,48 +1,70 @@
# SPDX-License-Identifier: MPL-2.0
# .gitattributes — line-ending normalisation, diff drivers and linguist hints
# for the languages this repository actually contains. Entries track
# `git ls-files`; absent languages (Elixir, ReScript, TypeScript, Zig) are not
# listed, and languages that were missing (Lean, ocamllex/menhir, WokeLang's
# own sources) now are.

# Auto detect text files and perform LF normalization
* text=auto

# Source code
*.rs text eol=lf diff=rust
*.ex text eol=lf diff=elixir
*.exs text eol=lf diff=elixir
*.ml text eol=lf diff=ocaml
*.mli text eol=lf diff=ocaml
*.res text eol=lf diff=javascript
*.resi text eol=lf diff=javascript
*.ts text eol=lf diff=typescript
*.js text eol=lf diff=javascript
*.idr text eol=lf
*.v text eol=lf
*.zig text eol=lf

# Configuration
*.toml text eol=lf
*.json text eol=lf
*.yml text eol=lf
*.yaml text eol=lf
*.scm text eol=lf linguist-language=Scheme

# Documentation
*.md text eol=lf diff=markdown
*.adoc text eol=lf
*.txt text eol=lf

# Scripts
*.sh text eol=lf
*.bash text eol=lf

# Build artifacts (binary)
*.wasm binary
*.rlib binary
*.beam binary
*.so binary
*.dylib binary
*.dll binary
*.exe binary

# Lock files (generated)
# Normalise everything to LF in the repository.
* text=auto eol=lf

# ── WokeLang itself ────────────────────────────────────────────────────────
# Report the project's own sources as its own language rather than letting
# linguist guess from the extension.
*.woke text eol=lf linguist-language=WokeLang
*.wl text eol=lf linguist-language=WokeLang
*.ebnf text eol=lf

# ── Rust: the primary toolchain (src/) ─────────────────────────────────────
*.rs text eol=lf diff=rust

# ── OCaml: the reference core (core/) ──────────────────────────────────────
*.ml text eol=lf diff=ocaml
*.mli text eol=lf diff=ocaml
*.mll text eol=lf linguist-language=OCaml
*.mly text eol=lf linguist-language=OCaml
*.opam text eol=lf

# ── Proof assistants ───────────────────────────────────────────────────────
*.lean text eol=lf linguist-language=Lean
*.v text eol=lf linguist-language=Coq
*.idr text eol=lf linguist-language=Idris
*.ipkg text eol=lf

# ── Configuration and data ─────────────────────────────────────────────────
*.toml text eol=lf
*.json text eol=lf
*.jsonl text eol=lf
*.yml text eol=lf
*.yaml text eol=lf
*.ncl text eol=lf
*.a2ml text eol=lf
*.scm text eol=lf linguist-language=Scheme

# ── Documentation ──────────────────────────────────────────────────────────
*.md text eol=lf diff=markdown
*.adoc text eol=lf
*.txt text eol=lf
*.tex text eol=lf
*.bib text eol=lf

# Documentation is not the project's language for linguist's purposes.
docs/** linguist-documentation
wiki/** linguist-documentation
site/** linguist-documentation

# ── Scripts ────────────────────────────────────────────────────────────────
*.sh text eol=lf
*.bash text eol=lf

# ── Binary ─────────────────────────────────────────────────────────────────
*.wasm binary
*.rlib binary
*.so binary
*.dylib binary
*.dll binary
*.exe binary
*.bundle binary

# ── Generated ──────────────────────────────────────────────────────────────
Cargo.lock linguist-generated=true
package-lock.json linguist-generated=true
mix.lock linguist-generated=true
26 changes: 17 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,11 @@ build/
*.ibc

# Zig
**/zig-out/
**/.zig-cache/

# ReScript
/lib/bs/
/.bsb.lock

# Dependencies
/node_modules/
/vendor/
/deps/

# Secrets
.env
Expand Down Expand Up @@ -78,9 +72,23 @@ editors/vscode/lib/
# OS
.Trash-*/
target/
node_modules/
_build/
deps/
.elixir_ls/
.cache/
dist/

# ── Proof-assistant build artefacts ────────────────────────────────────────
# Lean 4 (docs/proofs/verification/) — the .lean sources are tracked, the
# compiled forms are not.
*.olean
*.ilean
*.trace
.lake/

# Idris 2
*.ibc
*.ttc
*.ttm

# ── Exceptions ─────────────────────────────────────────────────────────────
# `*.wasm` is ignored above, but this one is a tracked example fixture.
!examples/math.wasm
18 changes: 16 additions & 2 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# SPDX-License-Identifier: MPL-2.0
# asdf version manager configuration
rust stable
# asdf / mise tool versions.
#
# Rust is pinned to the SAME version as rust-toolchain.toml. That file
# documents why the pin exists: when a developer's `stable` lagged CI's,
# clippy versions diverged (1.94 local vs 1.96 CI) and the `-D warnings` gate
# failed on main with lints local clippy could not see. Declaring `stable`
# here silently reintroduced exactly that drift, so bump the two together.
rust 1.96.0

# OCaml builds the reference core under core/ via dune + menhir.
# Lower bound comes from wokelang.opam ("ocaml" {>= "4.14"}).
ocaml 4.14.2

# Lean is pinned separately by docs/proofs/verification/lean-toolchain
# (leanprover/lean4:v4.30.0), which the lean-proofs workflow reads directly.
# It is deliberately not duplicated here, so there is one source of truth.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 18 additions & 4 deletions guix.scm
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,22 @@
(version "0.1.0")
(source #f)
(build-system gnu-build-system)
(synopsis "wokelang")
(description "wokelang — part of the hyperpolymath ecosystem.")
(synopsis "A human-centred, consent-driven programming language")
(description
"WokeLang is a statically typed programming language whose type system
discharges consent and affine-use reasoning, so destructive operations are
scaffolded at the language level rather than by convention. The primary
toolchain is written in Rust; a smaller OCaml reference core cross-checks the
semantics.")
(home-page "https://github.com/hyperpolymath/wokelang")
(license ((@@ (guix licenses) license) "MPL-2.0"
"https://github.com/hyperpolymath/palimpsest-license")))
;; Code is MPL-2.0 (documentation is CC-BY-SA-4.0, see LICENSES/).
;;
;; This previously read:
;; (license ((@@ (guix licenses) license) "MPL-2.0" "…"))
;; which was broken two ways: `@@` reaches into a NON-EXPORTED binding of
;; (guix licenses), and the `license` record constructor takes three fields
;; (name uri comment) but was given two. Since guix is not installed on the
;; development host, nothing ever evaluated this file and the fault went
;; unnoticed. `mpl2.0` is exported by (guix licenses) and is the correct
;; spelling.
(license mpl2.0))
82 changes: 26 additions & 56 deletions mise.toml
Original file line number Diff line number Diff line change
@@ -1,57 +1,27 @@
[tools]
# Language runtimes
node = "latest"
python = "latest"
rust = "latest"
go = "latest"
zig = "latest"
java = "latest"
bun = "latest"
denojs = "latest"

# Package managers
npm = "latest"
yarn = "latest"
pnpm = "latest"
pip = "latest"
cargo = "latest"
go-task = "latest"

# Formatting & Linting
gofmt = "latest"
black = "latest"
isort = "latest"
ruff = "latest"
prettier = "latest"
shfmt = "latest"
stylua = "latest"

# Build tools
cmake = "latest"
make = "latest"
ninja = "latest"
# SPDX-License-Identifier: MPL-2.0
# mise configuration.
#
# This file previously carried a generic estate template that was wrong for
# this repository in three ways, all of which mattered:
#
# 1. `rust = "latest"` contradicted rust-toolchain.toml, which pins 1.96.0
# precisely because a drifting `stable` broke the clippy `-D warnings`
# gate on main with lints local clippy could not see.
# 2. It declared node, python, go, java, bun, npm, yarn, pnpm and pip —
# every one of which is on the BANNED list in this repo's own
# .claude/CLAUDE.md language policy.
# 3. Its [alias] block chained fallbacks, e.g.
# test = "cargo test || npm test || go test ./..."
# which converts a genuine `cargo test` failure into an attempt at two
# more toolchains that do not exist here — a fake gate by construction.
#
# Tool versions live in .tool-versions (which mise reads natively); the Rust
# compiler is owned by rust-toolchain.toml and Lean by
# docs/proofs/verification/lean-toolchain. Nothing is duplicated here, so
# there is exactly one source of truth per toolchain.
#
# Real entry points are `just` recipes in the Justfile — not aliases here.

# Shell tools
git = "latest"
gnu-sed = "latest"
gnu-tar = "latest"
gnu-grep = "latest"

# Testing
vitest = "latest"
pytest = "latest"
jest = "latest"

[env]
# Common environment variables
NODE_ENV = "development"
PYTHONDONTWRITEBYTECODE = "1"
PYTHONUNBUFFERED = "1"

# Task runner alias
[alias]
task = "go-task"
build = "cargo build --release || npm run build || go build"
test = "cargo test || npm test || go test ./..."
lint = "ruff check . || prettier --check . || black --check ."
fmt = "ruff format . || prettier --write . || black ."
[tools]
# Intentionally empty: see .tool-versions, rust-toolchain.toml and
# docs/proofs/verification/lean-toolchain.
2 changes: 1 addition & 1 deletion src/stdlib/array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ mod tests {
let mut caps = test_caps();
let arr = Value::Array(vec![Value::Int(1), Value::Int(2), Value::Int(3)]);

if let Value::Okay(v) = first(&[arr.clone()], &mut caps).unwrap() {
if let Value::Okay(v) = first(std::slice::from_ref(&arr), &mut caps).unwrap() {
assert_eq!(*v, Value::Int(1));
}

Expand Down
Loading
Loading