2022-11-03 11:38:09 +03:00
|
|
|
module Commands.Dev.Runtime.Options where
|
|
|
|
|
|
|
|
import Commands.Dev.Runtime.Compile.Options
|
|
|
|
import CommonOptions
|
|
|
|
|
|
|
|
newtype RuntimeCommand
|
2022-12-06 13:33:20 +03:00
|
|
|
= Compile CompileOptions
|
2022-11-03 11:38:09 +03:00
|
|
|
deriving stock (Data)
|
|
|
|
|
|
|
|
parseRuntimeCommand :: Parser RuntimeCommand
|
|
|
|
parseRuntimeCommand =
|
|
|
|
hsubparser $
|
|
|
|
mconcat
|
|
|
|
[ commandCompile
|
|
|
|
]
|
|
|
|
where
|
|
|
|
commandCompile :: Mod CommandFields RuntimeCommand
|
|
|
|
commandCompile = command "compile" compileInfo
|
|
|
|
|
|
|
|
compileInfo :: ParserInfo RuntimeCommand
|
|
|
|
compileInfo =
|
|
|
|
info
|
2022-12-06 13:33:20 +03:00
|
|
|
(Compile <$> parseCompileOptions)
|
2022-11-03 11:38:09 +03:00
|
|
|
(progDesc "Compile a C file with Juvix runtime included")
|