13 Commits

Author SHA1 Message Date
James Eversole
918d929c09 # File eval mode now relies on main function
All checks were successful
Test, Build, and Release / test (push) Successful in 1m26s
Test, Build, and Release / build (push) Successful in 1m15s
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.
2025-01-26 15:33:12 -06:00
James Eversole
a64b3f0829 Definition dependency analysis
All checks were successful
Test, Build, and Release / test (push) Successful in 1m34s
Test, Build, and Release / build (push) Successful in 1m21s
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
James Eversole
e2621bc09d Allow lambda expressions without explicit paren
All checks were successful
Test, Build, and Release / test (push) Successful in 1m41s
Test, Build, and Release / build (push) Successful in 1m19s
2025-01-26 08:52:28 -06:00
James Eversole
8995efce15 Release 0.6.0
All checks were successful
Test, Build, and Release / test (push) Successful in 1m38s
Test, Build, and Release / build (push) Successful in 1m40s
2025-01-23 16:44:14 -06:00
James Eversole
c2e5a8985a Inline pattern matching in Parser 2025-01-21 14:21:47 -06:00
James Eversole
35163a5d54 Allow multiline expressions 2025-01-20 19:20:29 -06:00
James Eversole
ad02c8b86a General refactor for legibility
Priming to update all source to lhs and document extensively
2025-01-19 14:41:25 -06:00
James Eversole
a3282b794f 0.5.0 release commit 2025-01-06 09:14:04 -06:00
James Eversole
a2c459b148 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
James Eversole
7d38d99dcd Rename "compiler" functionality to Evaluator
Allows for stdin input for evaluation when no input file is provided.
2025-01-01 08:23:53 -06:00
James Eversole
493ef51a6a Add "SimpleT" t output form
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.
2024-12-31 10:00:52 -06:00
James Eversole
2abeab9c04 Adds "compiler" and CLI argument handling 2024-12-29 21:49:57 -06:00
James Eversole
c30f17367f Rename from sapling to tricu 2024-12-29 08:29:25 -06:00