1
1
mirror of https://github.com/anoma/juvix.git synced 2024-12-13 11:16:48 +03:00
juvix/app/Commands/Dev/Internal/Pretty.hs

13 lines
552 B
Haskell
Raw Normal View History

2022-09-14 17:16:15 +03:00
module Commands.Dev.Internal.Pretty where
import Commands.Base
import Commands.Dev.Internal.Pretty.Options
import Juvix.Compiler.Internal.Pretty qualified as Internal
import Juvix.Compiler.Internal.Translation.FromConcrete qualified as Internal
2022-09-14 17:16:15 +03:00
runCommand :: (Members '[Embed IO, App] r) => InternalPrettyOptions -> Sem r ()
2022-09-14 17:16:15 +03:00
runCommand opts = do
globalOpts <- askGlobalOptions
intern <- head . (^. Internal.resultModules) <$> runPipelineTermination (opts ^. internalPrettyInputFile) upToInternal
2022-09-14 17:16:15 +03:00
renderStdOut (Internal.ppOut globalOpts intern)