1
1
mirror of https://github.com/anoma/juvix.git synced 2024-12-15 01:52:11 +03:00
juvix/app/Main.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

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