fix some warnings

This commit is contained in:
2026-08-18 21:14:46 -06:00
parent 6949ff7fdf
commit 8bdbfafb9c
7 changed files with 20 additions and 75 deletions
-1
View File
@@ -8,7 +8,6 @@ import Data.List (List)
import Gyehoek.CPS.Syntax (cps)
import Gyehoek.GenSym (runGenSym)
import Effectful
import Test.Tasty.ExpectedFailure (expectFail)
root :: IO TestTree
-3
View File
@@ -3,12 +3,9 @@ module Gyehoek.Test.CPS.Syntax (root) where
import Test.Tasty (TestTree, testGroup)
import Test.Tasty.HUnit
import Language.Sexp.Located qualified as SL
import Language.SexpGrammar ()
import Gyehoek.CPS.Syntax (cps)
import Gyehoek.CPS.Syntax qualified as Sut
import Data.Function (on)
import Gyehoek.Test.Sexp (equivto)
root :: IO TestTree
+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"