1
1
mirror of https://github.com/anoma/juvix.git synced 2024-12-15 18:13:56 +03:00
juvix/test/Core/Transformation/Lifting.hs

30 lines
720 B
Haskell
Raw Normal View History

module Core.Transformation.Lifting (allTests) where
import Base
import Core.Eval.Positive qualified as Eval
import Core.Transformation.Base
import Juvix.Compiler.Core.Transformation
allTests :: TestTree
allTests = testGroup "Lambda lifting" (mapMaybe liftTest Eval.tests)
pipe :: [TransformationId]
pipe = [LambdaLifting]
liftTest :: Eval.PosTest -> Maybe TestTree
liftTest _testEval@Eval.PosTest {..}
| _name `elem` excluded = Nothing
| otherwise =
Just $
fromTest
Test
{ _testTransformations = pipe,
_testAssertion = \i -> unless (isLifted i) (error "not lambda lifted"),
_testEval
}
excluded :: [String]
excluded =
[ "LetRec"
]