Commit Graph

25 Commits

Author SHA1 Message Date
d54ad558a8 Runtime contract guard kernel 2026-09-02 13:08:54 -05:00
b822e7e713 Nat fixes 2026-09-01 12:54:26 -05:00
e595763f91 Attach contracts to definitions
Contracts now live directly on definitions via @ / =@ annotations and
travel automatically with exported values.

- Remove !export from lexer/parser/AST/evaluator/manifest/resolver and CLI.
- Simplify workspace module export logic: export all top-level local
  definitions by default.
- Update Frontend.ContractDesugar:
  - Named binder annotations (x@nat?) expand to per-argument withContract.
  - Phantom annotations (@nat?) expand to a local raw helper plus a wrapper,
    keeping fixed points shared and only depending on withContract.
- Merge lib/guardedBase.tri into lib/base.tri and annotate partial/sensitive
  base functions: head, tail, last, add, sub, mul, div, mod, pow, min,
  max, length, sum, product.
- Add check contract helper to lib/base.tri.
- Update demos/contractBasics.tri and README to reflect @/=@-only design.
- Update test suite: remove guardedBase import, replace explicit !export
  test with a test verifying that contract annotations on an exported
  definition are enforced on import.
- Fix remaining base.tri definitions (div/mod/pow) to stay point-free.
2026-09-01 12:08:40 -05:00
229ba34af4 Combine base,list,contracts 2026-09-01 08:50:18 -05:00
d9a69513d7 Begin removing view related code and docs 2026-09-01 07:53:29 -05:00
c6e4a43178 Back out the worst of the unsound nonsense 2026-07-10 18:26:38 -05:00
a4fcc1cb36 Useful but limited polymorphism 2026-05-25 18:17:16 -05:00
2e2db07bd6 Ergonomic language features and lib cleanup
+ let bindings
+ where bindings
+ do notation

I explored enough of the alternative language design space and decided
that we should commit fully to Lambda style. That means no more highly
tacit/concatenative point-free/partial programs as default. We'll keep
taking advantage of those capabilities when it makes sense, but the
library will continue to see massive overhauls.
2026-05-23 18:28:02 -05:00
bf30d5945e (: Aiche Tee Tee Pee :)
Perhaps the first webserver in Tree Calculus? Sure, it's married to a Haskell
IO runtime... but we're managing all of the actual webserver semantics in tricu!

This includes a demo Arboricx application server that is capable of storing
and serving bundles.
2026-05-21 09:05:12 -05:00
e2a1744508 Helpful library updates 2026-05-19 19:50:38 -05:00
2e13583de3 Strings for IO driver errors 2026-05-18 19:12:42 -05:00
d6df01105c feat(haskell): Interaction Tree IO
oops, now we have purely modelled IO 🤷
2026-05-12 18:47:38 -05:00
f2beb86d8a Drop backslash from lambda definitions 2025-04-15 10:34:38 -05:00
f9864b8361 REPL namespaces; lib function for pattern matching
All checks were successful
Test, Build, and Release / test (push) Successful in 1m52s
Test, Build, and Release / build (push) Successful in 1m20s
Adds support for REPL namespacing, primarily to avoid `main` collisions.
Also adds a library function for an ergonomic pattern matching function
that I've been noodling on. I might explore ways to make list syntax
less annoying specifically for pattern matching like this.
2025-02-02 10:56:40 -06:00
1a9a4494e0 Caller-relative imports; smart deduping in imports
All checks were successful
Test, Build, and Release / test (push) Successful in 1m35s
Test, Build, and Release / build (push) Successful in 1m13s
2025-01-30 17:56:46 -06:00
a16a24a808 Replace placeholder xor? library function 2025-01-30 17:17:07 -06:00
7d1b6a741d REPL import warning; version info in CLI
All checks were successful
Test, Build, and Release / test (push) Successful in 1m18s
Test, Build, and Release / build (push) Successful in 1m13s
Adds the ability to toggle result decoding in REPL. Adds several more
useful functions to the base library.
2025-01-30 16:33:36 -06:00
425489a73f Definition dependency analysis
tricu now allows defining terms in any order and will resolve
dependencies to ensure that they're evaluated in the right order.
Undefined terms are detected and throw errors during dependency
ordering.
For now we can't define top-level mutually recursive terms.
2025-01-26 14:50:39 -06:00
b0b0fb22b9 Allow lambda expressions without explicit paren 2025-01-26 08:52:28 -06:00
6713b05872 Add optimization cases for triage and composition 2025-01-25 15:12:28 -06:00
3175132eec Immutable definitions and documentation updates 2025-01-24 16:14:33 -06:00
10c7cc367d Some special characters in ids; new demos
Adds support for several special characters in identifiers. Adds a demo
for converting values to source code and another for checking equality.
Updates the existing demo and tests to reflect new names for functions
returning booleans.
2025-01-23 15:46:40 -06:00
ec0a6b7b16 Allow multiline expressions 2025-01-20 19:20:29 -06:00
3fec1e0c68 Level Order Traversal demo 2025-01-03 12:00:06 -06:00
8b0b24e7dc Provide "library" via tricu file directly
Allows easier loading of other files and drops the list of Haskell
strings containing the basic tools included
2025-01-01 18:53:56 -06:00