Open ryukzak opened 2 years ago
In test:
, unitTestCase "target system: autosynthesis, constant folding 1" def $ do setNetwork march setBusType pInt assignLua [__i| function sum(a) local d = 1 + 2 + a sum(d) end sum(0) |] synthesizeAndCoSim mkConstantFolding [ add "!1#0" "!2#0" ["_0#d"] , constant 2 ["!2#0"] , constant 1 ["!1#0"] ] -- FIXME: should be: -- [ constant 3 ["_0#d"] ] [ constant 3 ["_0#d"] , constant 2 ["!2#0"] , constant 1 ["!1#0"] ] >>= \r -> assertRefactor r
stack build --fast --test --test-arguments '-p "constant folding 1"'
Update in https://github.com/ryukzak/nitta/pull/274
In test: