fix some warnings

This commit is contained in:
2026-08-18 21:14:50 -06:00
parent 6949ff7fdf
commit 8bdbfafb9c
7 changed files with 20 additions and 75 deletions
+6 -15
View File
@@ -5,8 +5,6 @@ import Test.Tasty.HUnit
import Gyehoek.Stack.Syntax
import Gyehoek.Stack.VM qualified as Sut
import Data.List (List)
import Control.Lens
import Data.Generics.Labels
root :: IO TestTree
@@ -31,8 +29,6 @@ lit_int = testCase "lit int" do
]
]
vlb = ValImm . ImmLabel
procedure = testGroup "procedure"
[ testCase "return constant" do
evalsTo [ObjImm (ImmInt 123)]
@@ -66,7 +62,7 @@ procedure = testGroup "procedure"
]
]
, testCase "factorial" do
let fac =
let fac n =
[ MkBlock "fac" ["n"]
[ Prim "x0" $ PrimZeroP (ValReg "n")
, If (ValReg "x0")
@@ -85,17 +81,12 @@ procedure = testGroup "procedure"
, PopCont "ktail"
, Call (ValReg "ktail") [ValReg "x3"]
]
, MkBlock "main" []
[ Call (ValLabel "fac") [ValImm (ImmInt n)]
]
]
evalsTo [ObjImm (ImmInt 1)] $
[ MkBlock "main" []
[ Call (ValLabel "fac") [ValImm (ImmInt 0)]
]
] ++ fac
evalsTo [ObjImm (ImmInt 720)] $
[ MkBlock "main" []
[ Call (ValLabel "fac") [ValImm (ImmInt 6)]
]
] ++ fac
evalsTo [ObjImm (ImmInt 1)] $ fac 0
evalsTo [ObjImm (ImmInt 720)] $ fac 6
]
prims = testGroup "prims"