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

16 lines
471 B
Haskell
Raw Normal View History

2022-09-14 17:16:15 +03:00
module Commands.Dev.DisplayRoot where
import Commands.Base
2022-12-20 15:05:40 +03:00
import Commands.Dev.DisplayRoot.Options
import Data.Yaml
2022-09-14 17:16:15 +03:00
runCommand :: forall r. (Members '[Embed IO, App] r) => RootOptions -> Sem r ()
2022-12-20 15:05:40 +03:00
runCommand RootOptions {..} = do
askPkgDir >>= say . pack . toFilePath
when _rootPrintPackage printPackage
where
printPackage :: Sem r ()
printPackage = do
say "+----------------------------+"
askPackage >>= say . decodeUtf8 . encode . rawPackage