1
1
mirror of https://github.com/anoma/juvix.git synced 2024-12-14 08:27:03 +03:00
juvix/app/Main.hs

19 lines
473 B
Haskell
Raw Normal View History

2022-01-18 14:25:42 +03:00
module Main (main) where
import App
2022-09-14 17:16:15 +03:00
import CommonOptions
import Juvix.Compiler.Pipeline
import Root
2022-09-14 17:16:15 +03:00
import TopCommand
import TopCommand.Options
2022-09-14 17:16:15 +03:00
main :: IO ()
main = do
let p = prefs showHelpOnEmpty
(global, cli) <- customExecParser p descr >>= secondM makeAbsPaths
(root, pkg) <- findRoot' cli
2022-09-14 17:16:15 +03:00
runM (runAppIO global root pkg (runTopCommand cli))
where
findRoot' :: TopCommand -> IO (FilePath, Package)
findRoot' cli = findRoot (topCommandInputFile cli)