8000 GitHub - dikini/ash-lang · GitHub
[go: up one dir, main page]

Skip to content
dikiniPublic

About

No description, website, or topics provided.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Ash

This repository is a reboot of the Ash programming language. The reboot keeps lessons from historical Ash while rebuilding the language from a small, coherent base. Historical Ash is evidence for design work, not authority for this project.

Ash is a strict, statically typed language with rank-1 polymorphism, nominal data, interfaces, and checked lexical authority. Programs are acyclic graphs of passive .ash source modules. The entry module supplies a local main function. Here is a complete program.

main : Unit -> Int
main () = 42

Implemented on main

The current dialect is ffi-ash. The canonical specification defines the language and runtime behavior. The feature inventory links capabilities to their implementation evidence.

  • Values and functions. Arbitrary-precision Int, Bool, Unit, immutable Bytes, UTF-8 String, tuples, nominal data, module and local newtype, exhaustive pattern matching, lexical closures, and recursion.
  • Modules and interfaces. Qualified and selective imports, re-exports, opaque types, higher-kinded parameters, constrained functions, explicit implementation selection, method-local type parameters, relational interface determination, and exact lexical method evidence through with.
  • Resources and control. Linear, affine, and unrestricted values and captures. Qualified values track the lexical dependencies they retain. scope<S> introduces a fresh scope, and callable state contracts check live authority and early close. Ordinary functions, data, and interfaces express one-shot entry, discardable continuations, and sequential replay with explicit completion. Ordinary construction uses managed storage. Qualified value rules
  • Macros. Explicitly imported hygienic expression macros, top-level declaration macros, and derives for type and newtype. Templates and checked Ash transformers expand into ordinary syntax before checking. Syntax expansion
  • Native calls. Effect rows track exact primitive requirements. A program supplies a matching native binding for each symbol required by the entry function. Synchronous C calls on x86_64-unknown-linux-gnu support opaque addresses, eligible readonly Bytes arguments, flat pointer tuples as arguments, and pointer, pointer-pair, or C void results. Ash binding modules express checks and release policy in ordinary code. Foreign rules
  • Tools. The ash interpreter runs a source entry module. ash build packages independently validated Core with an evaluator in a generated Rust host, with explicit native link inputs. The CLI supports human, short, and JSON diagnostics, including English and Bulgarian localization. ash tool guide

Historical features and checkpoints

Earlier checkpoints included implicit handlers and continuation capture, builtin integer and generic cells, source-selected region allocation and DefaultAlloc, Store, hooks, automatic cleanup, cooperative scheduling, and pinned workers with copied FIFO byte channels. These facilities were retired in the accepted ordinary foundation. The Work/Ack byte codec remains as ordinary source code. Retirement and acceptance · Source libraries

The mini-ash, modular-ash, effect-ash, and ffi-ash Git tags preserve earlier checkpoints. The name ffi-ash still identifies the dialect on main. The ffi-ash closure report describes the tagged checkpoint. The development trajectory records the current implementation and retired work.

Project documentation

Long-term direction

Ash is not only a language for expressing programs. It aims to be a language for expressing truth about programs: values, behavior, invariants, and the laws that must hold. In the long-term direction, Ash wants programs to state not only what a computation does, but also what properties are required, which facts are assumed, which obligations are proven, and which remain subjects for testing. The language is designed to combine executable code with sound reasoning so that real systems can be built with principled guarantees rather than only informal confidence.

In other words, Ash aims to support the full arc from implementation to specification to evidence: ordinary computation, static guarantees, property checks, and proof-backed facts in one consistent language story.

Human contributors should start with CONTRIBUTING.md. Agents should start with AGENTS.md and reconstruct only the context needed for their task.

License

Ash is licensed under the GNU General Public License version 3 (GPL-3.0-only).

About

No description, website, or topics provided.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

0