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.
This commit is contained in:
James Eversole
2024-12-31 10:00:52 -06:00
parent 5e2a4dff50
commit 493ef51a6a
10 changed files with 120 additions and 112 deletions

View File

@ -388,6 +388,9 @@ compilerTests = testGroup "Compiler tests"
, testCase "Mapping and Equality" $ do
res <- liftIO $ evaluateFile "./test/map.tri"
res @?= Stem Leaf
, testCase "Map evaluation to String -> compilation -> string decoding" $ do
res <- liftIO $ evaluateFile "./test/string.tri"
decodeResult res @?= "String test!"
]
propertyTests :: TestTree

1
test/string.tri Normal file
View File

@ -0,0 +1 @@
head (map (\i : lconcat "String " i) [("test!")])