mirror of
https://github.com/anoma/juvix.git
synced 2024-12-29 10:33:15 +03:00
65176a333d
- refactor `--target` into subcommands for `dev tree compile`. - prepend `App` to all `CompileTarget` constructors to avoid name clashes with `Target`. - parameterize compile options type with the input kind. The input kind indicates the expected file extension of the input file. If the input file is a .juvix file, then it is optional, otherwise it is mandatory. - Add `AppError MegaparsecError` instance and simplify some related code.
19 lines
621 B
Haskell
19 lines
621 B
Haskell
module Commands.Dev.Tree where
|
|
|
|
import Commands.Base
|
|
import Commands.Dev.Tree.Compile as Compile
|
|
import Commands.Dev.Tree.Eval as Eval
|
|
import Commands.Dev.Tree.FromAsm as FromAsm
|
|
import Commands.Dev.Tree.Options
|
|
import Commands.Dev.Tree.Read as Read
|
|
import Commands.Dev.Tree.Repl as Repl
|
|
|
|
runCommand :: forall r. (Members '[EmbedIO, App, TaggedLock] r) => TreeCommand -> Sem r ()
|
|
runCommand = \case
|
|
Eval opts -> Eval.runCommand opts
|
|
Compile opts -> Compile.runCommand opts
|
|
CompileOld {} -> impossible
|
|
Read opts -> Read.runCommand opts
|
|
FromAsm opts -> FromAsm.runCommand opts
|
|
Repl opts -> Repl.runCommand opts
|