+ 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.
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.
Add multi-root bundle support across the toolchain:
- `compile`: Accept multiple definition names via `-x NAME` (repeatable or
comma-separated). Exports all requested definitions as named roots in a
single bundle. Defaults to "main" when no names are given.
- `export`: Accept comma-separated hashes in the positional argument and
multiple `-n`/`names` flags. Exports all resolved roots in one bundle.
- Server: Add `GET /bundle/roots?n=...&h=...` endpoint that resolves
multiple stored-term names and/or raw Merkle hashes, returning a single
bundle containing all of them as roots.
- Wire: Export `defaultExportNames` helper for generating default export
names when none are supplied.
- Drop `cereal` dependency from `tricu.cabal` (no longer used).
Introduces a read-only HTTP server (WAI/Warp) backed by the content
store, exposing three bundle-export endpoints:
- GET /bundle/name/:name — export by stored term name
- GET /bundle/hash/:hash — export by full Merkle hash
- GET /terms — plain-text listing (debug)
Also adds `tricu server` (aka `--serve`) CLI mode, move `resolveExportTarget` /
`namesForHash` / `looksLikeHash` out of `Main.hs` into `ContentStore.hs`,
and cleans up unused exports and imports across `FileEval.hs` and `Wire.hs`.
To encourage organizing code in a way that helps in understanding, I
have implemented the common idiom of requiring a `main` function. In
tricu and other functional languages, it is usually placed near the top
of the module. The evaluator gracefully handles the situation of passing
multiple files where the intermediary "library" files do not have main functions.
This new output form allows easy piping to the decode function of the
tricu executable. Includes a new test for roundtrip evaluation of map,
compilation to tree calculus terms, and decoding back to a human
readable string.
Adds CLI options for compiling to a Tree Calculus, AST, Ternary, and
ASCII tree view. Adds CLI command for attempted decoding of a compiled
result to Number/String/List.
Architectural changes to lambda evaluation and parsing to allow
for correct expression evaluation. Contains several failing AI-generated
tests and we're still failing tests for erroring incomplete definitions