mirror of
https://github.com/anoma/juvix.git
synced 2024-12-15 01:52:11 +03:00
5de0026d83
Co-authored-by: Paul Cadman <git@paulcadman.dev>
23 lines
656 B
Haskell
23 lines
656 B
Haskell
module Main (main) where
|
|
|
|
import App
|
|
import CommonOptions
|
|
import GlobalOptions
|
|
import Juvix.Compiler.Pipeline.Root
|
|
import TopCommand
|
|
import TopCommand.Options
|
|
|
|
main :: IO ()
|
|
main = do
|
|
let parserPreferences = prefs showHelpOnEmpty
|
|
invokeDir <- getCurrentDir
|
|
(_runAppIOArgsGlobalOptions, cli) <- customExecParser parserPreferences descr
|
|
let mbuildDir = _runAppIOArgsGlobalOptions ^? globalBuildDir . _Just . pathPath
|
|
mainFileDir <- topCommandInputFile cli
|
|
_runAppIOArgsRoots <- findRootAndChangeDir mainFileDir mbuildDir invokeDir
|
|
runFinal
|
|
. resourceToIOFinal
|
|
. embedToFinal @IO
|
|
. runAppIO RunAppIOArgs {..}
|
|
$ runTopCommand cli
|