mirror of
https://github.com/anoma/juvix.git
synced 2024-12-15 10:03:22 +03:00
f2298bd674
An implementation of the translation from JuvixCore to JuvixAsm. After merging this PR, the only remaining step to complete the basic compilation pipeline (#1556) is the compilation of complex pattern matching (#1531). * Fixes several bugs in lambda-lifting. * Fixes several bugs in the RemoveTypeArgs transformation. * Fixes several bugs in the TopEtaExpand transformation. * Adds the ConvertBuiltinTypes transformation which converts the builtin bool inductive type to Core primitive bool. * Adds the `juvix dev core strip` command. * Adds the `juvix dev core asm` command. * Adds the `juvix dev core compile` command. * Adds two groups of tests: - JuvixCore to JuvixAsm translation: translate JuvixCore tests to JuvixAsm and run the results with the JuvixAsm interpreter, - JuvixCore compilation: compile JuvixCore tests to native code and WASM and execute the results. * Closes #1520 * Closes #1549
20 lines
648 B
Haskell
20 lines
648 B
Haskell
module Commands.Dev.Core where
|
|
|
|
import Commands.Base
|
|
import Commands.Dev.Core.Asm as Asm
|
|
import Commands.Dev.Core.Compile as Compile
|
|
import Commands.Dev.Core.Eval as Eval
|
|
import Commands.Dev.Core.Options
|
|
import Commands.Dev.Core.Read as Read
|
|
import Commands.Dev.Core.Repl as Repl
|
|
import Commands.Dev.Core.Strip as Strip
|
|
|
|
runCommand :: forall r. Members '[Embed IO, App] r => CoreCommand -> Sem r ()
|
|
runCommand = \case
|
|
Repl opts -> Repl.runCommand opts
|
|
Eval opts -> Eval.runCommand opts
|
|
Read opts -> Read.runCommand opts
|
|
Strip opts -> Strip.runCommand opts
|
|
CoreAsm opts -> Asm.runCommand opts
|
|
CoreCompile opts -> Compile.runCommand opts
|