mirror of
https://github.com/anoma/juvix.git
synced 2024-12-12 14:28:08 +03:00
34719bbc4d
- Closes #2293. - Closes #2319 I've added an effect for termination. It keeps track of which functions failed the termination checker, which is run just after translating to Internal. During typechecking, non-terminating functions are not normalized. After typechecking, if there is at least one function which failed the termination checker, an error is reported. Additionally, we now properly check for termination of functions defined in a let expression in the repl.
13 lines
571 B
Haskell
13 lines
571 B
Haskell
module Commands.Dev.Internal.Reachability where
|
|
|
|
import Commands.Base
|
|
import Commands.Dev.Internal.Reachability.Options
|
|
import Juvix.Compiler.Internal.Pretty qualified as Internal
|
|
import Juvix.Compiler.Internal.Translation.FromConcrete qualified as Internal
|
|
|
|
runCommand :: (Members '[Embed IO, App] r) => InternalReachabilityOptions -> Sem r ()
|
|
runCommand opts = do
|
|
globalOpts <- askGlobalOptions
|
|
depInfo <- (^. Internal.resultDepInfo) <$> runPipelineTermination (opts ^. internalReachabilityInputFile) upToInternal
|
|
renderStdOut (Internal.ppOut globalOpts depInfo)
|