A functional language with strong static typing, focused on reliability.
- Friendly CLI (typecheck, build, run, format)
- The behavior is tested to be equivalent across targets.
- JS
- Lua
- Install the
Awsumextension to enable syntax highlight and code formatting - Enable format on save
{
// settings.json
"[awsum]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "awsum-lang.awsum-vscode"
}
}- Install Stack via
ghcup - Install Node.js via NVM (for targeting JS)
- Install Lua via
brew install lua(for targeting Lua) stack buildstack install- Make sure
~/.local/binis inPATH
awsum build FILE [-t js] [-o OUT]— compile to target and write to file (or stdout).awsum run FILE [-t js] [--input TEXT | --stdin]— compile to a temp file and execute with the system runtime, passing input to main.awsum check FILE— parse and typecheck; printsOKor a descriptive error.awsum format FILE [-i|--in-place]—render . parsewith stable formatting. Preserves comments (including trailing inline), keeps a blank line between top-level blocks, and ends the file with a trailing newline.awsum ast FILE— pretty-print the surface AST (for debugging).awsum core FILE— print elaborated/lowered Core (post type elaboration) (for debugging).awsum --version— show version
Examples:
awsum build test/sources/hello.aww -t js -o out.js && node out.js "world"
awsum build test/sources/hello.aww -t lua -o out.lua && lua out.lua "world"
awsum run test/sources/hello.aww -t js --input "world"
awsum run test/sources/hello.aww -t lua --input "world"
echo "world" | awsum run test/sources/hello.aww -t js --stdin
echo "world" | awsum run test/sources/hello.aww -t lua --stdin
awsum check test/sources/hello.aww
awsum format test/sources/hello.aww -i
awsum ast test/sources/hello.aww
awsum core test/sources/hello.aww
awsum --version- Equivalent behavior for numbers and strings across different runtimes.
- All arithmetic operations via Either. No silent underflow, overflow, precision loss. No NaN, Infinity, -0, etc.
- A compiler aware of dependency between application formats (cli, browser), targets (JS, Lua) and specific effects (Terminal, DOM, Ports) to allow compilation only for a specific set of effects.