1
1
mirror of https://github.com/anoma/juvix.git synced 2025-01-08 16:51:53 +03:00
juvix/test/BackendGeb/Compilation/Base.hs
janmasrovira 5de0026d83
Add juvix global project under xdg directory and other improvements (#1963)
Co-authored-by: Paul Cadman <git@paulcadman.dev>
2023-04-13 11:27:39 +02:00

18 lines
592 B
Haskell

module BackendGeb.Compilation.Base where
import BackendGeb.FromCore.Base
import Base
import Juvix.Compiler.Backend (Target (TargetGeb))
import Juvix.Compiler.Core qualified as Core
gebCompilationAssertion ::
Path Abs File ->
Path Abs File ->
(String -> IO ()) ->
Assertion
gebCompilationAssertion mainFile expectedFile step = do
step "Translate to JuvixCore"
entryPoint <- set entryPointTarget TargetGeb <$> defaultEntryPointCwdIO mainFile
tab <- (^. Core.coreResultTable) . snd <$> runIO' entryPoint upToCore
coreToGebTranslationAssertion' tab entryPoint expectedFile step