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

13 lines
584 B
Haskell
Raw Normal View History

2022-09-14 17:16:15 +03:00
module Commands.Dev.Internal.Arity where
import Commands.Base
import Commands.Dev.Internal.Arity.Options
import Juvix.Compiler.Internal.Pretty qualified as Internal
import Juvix.Compiler.Internal.Translation.FromInternal.Analysis.ArityChecking.Data.Context qualified as InternalArity
runCommand :: Members '[Embed IO, App] r => InternalArityOptions -> Sem r ()
runCommand opts = do
globalOpts <- askGlobalOptions
micro <- head . (^. InternalArity.resultModules) <$> runPipeline (opts ^. internalArityInputFile) upToInternalArity
renderStdOut (Internal.ppOut globalOpts micro)