Some checks failed
Deploy Landing Page to Storj / deploy (push) Failing after 2s
- check-dist.sh: Prevents DIST DESYNC by verifying all dist/*.js files
are newer than their src/*.ts sources. Fails build if stale.
- Makefile: Standard build targets (build/check-dist/test/recompile/clean)
- src/index.ts: Integrated dist freshness check before compilation
- src/parser.ts: Added List<T> type parsing alongside existing Set<T>/Map<K,V>
(e.g., 'log: List<LogEntry>' now parses as { type: 'list', elementType })
- examples/: Restored v0.3 state machine specs (TigerBeetleLedger,
AccountLedger, ToggleSwitch, TwoPhaseCommit)
- DIST DESYNC is a known recurring anti-pattern — this guard prevents it
Tests: 39/41 pass (2 pre-existing E2E WASM failures due to missing wabt)
30 lines
496 B
Text
30 lines
496 B
Text
speck ToggleSwitch {
|
|
// Simplest possible state machine: on/off toggle
|
|
// Demonstrates the v0.3 imperative action body syntax
|
|
|
|
state {
|
|
isOn: Bool
|
|
}
|
|
|
|
init {
|
|
isOn == false
|
|
}
|
|
|
|
invariant SwitchConsistent {
|
|
isOn in {true, false}
|
|
}
|
|
|
|
action TurnOn {
|
|
require not isOn
|
|
isOn := true
|
|
return isOn
|
|
}
|
|
|
|
action TurnOff {
|
|
require isOn
|
|
isOn := false
|
|
return isOn
|
|
}
|
|
|
|
next: TurnOn | TurnOff
|
|
}
|