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
|
2023-06-30 16:01:46 +03:00
|
|
|
import Juvix.Compiler.Internal.Translation.FromConcrete qualified as Internal
|
2022-09-14 17:16:15 +03:00
|
|
|
|
2023-12-06 20:24:59 +03:00
|
|
|
runCommand :: (Members '[Embed IO, App, TaggedLock] r) => InternalPrettyOptions -> Sem r ()
|
2022-09-14 17:16:15 +03:00
|
|
|
runCommand opts = do
|
|
|
|
globalOpts <- askGlobalOptions
|
2023-12-30 22:15:35 +03:00
|
|
|
intern <- (^. pipelineResult . Internal.resultModule) <$> runPipelineTermination (opts ^. internalPrettyInputFile) upToInternal
|
2022-09-14 17:16:15 +03:00
|
|
|
renderStdOut (Internal.ppOut globalOpts intern)
|