diff --git a/src/Juvix/Compiler/Pipeline/Run.hs b/src/Juvix/Compiler/Pipeline/Run.hs index 37d9372fd6..20d545c58d 100644 --- a/src/Juvix/Compiler/Pipeline/Run.hs +++ b/src/Juvix/Compiler/Pipeline/Run.hs @@ -92,9 +92,6 @@ runIO opts entry = runIOEither entry >=> mayThrow Left err -> runM . runReader opts $ printErrorAnsiSafe err >> embed exitFailure Right r -> return r -runIO' :: EntryPoint -> Sem PipelineEff a -> IO (ResolverState, a) -runIO' = runIOLockMode LockModeExclusive defaultGenericOptions - runIOExclusive :: EntryPoint -> Sem PipelineEff a -> IO (ResolverState, a) runIOExclusive = runIOLockMode LockModeExclusive defaultGenericOptions diff --git a/test/BackendGeb/Compilation/Base.hs b/test/BackendGeb/Compilation/Base.hs index 26ebf313cd..fe8116965c 100644 --- a/test/BackendGeb/Compilation/Base.hs +++ b/test/BackendGeb/Compilation/Base.hs @@ -15,5 +15,5 @@ gebCompilationAssertion :: gebCompilationAssertion root mainFile expectedFile step = do step "Translate to JuvixCore" entryPoint <- set entryPointTarget TargetGeb <$> defaultEntryPointIO' LockModeExclusive root mainFile - tab <- (^. Core.coreResultTable) . snd <$> runIO' entryPoint upToCore + tab <- (^. Core.coreResultTable) . snd <$> runIOExclusive entryPoint upToCore coreToGebTranslationAssertion' tab entryPoint expectedFile step diff --git a/test/Compilation/Base.hs b/test/Compilation/Base.hs index 3d7bae1821..60cc0215dd 100644 --- a/test/Compilation/Base.hs +++ b/test/Compilation/Base.hs @@ -43,7 +43,7 @@ compileErrorAssertion :: compileErrorAssertion root' mainFile step = do step "Translate to JuvixCore" entryPoint <- defaultEntryPointIO' LockModeExclusive root' mainFile - tab <- (^. Core.coreResultTable) . snd <$> runIO' entryPoint upToCore + tab <- (^. Core.coreResultTable) . snd <$> runIOExclusive entryPoint upToCore case run $ runReader Core.defaultCoreOptions $ runError @JuvixError $ Core.toStripped' tab of Left _ -> assertBool "" True Right _ -> assertFailure "no error" diff --git a/test/Format.hs b/test/Format.hs index ef40780239..b4821bd482 100644 --- a/test/Format.hs +++ b/test/Format.hs @@ -41,12 +41,12 @@ testDescr PosTest {..} = original :: Text <- readFile (toFilePath f) step "Parsing" - p :: Parser.ParserResult <- snd <$> runIO' entryPoint upToParsing + p :: Parser.ParserResult <- snd <$> runIOExclusive entryPoint upToParsing step "Scoping" s :: Scoper.ScoperResult <- snd - <$> runIO' + <$> runIOExclusive entryPoint ( do void (entrySetup defaultDependenciesConfig) diff --git a/test/Internal/Eval/Base.hs b/test/Internal/Eval/Base.hs index 8e318dc62d..92baf8c2be 100644 --- a/test/Internal/Eval/Base.hs +++ b/test/Internal/Eval/Base.hs @@ -17,7 +17,7 @@ internalCoreAssertion :: Path Abs Dir -> Path Abs File -> Path Abs File -> (Stri internalCoreAssertion root' mainFile expectedFile step = do step "Translate to Core" entryPoint <- defaultEntryPointIO' LockModeExclusive root' mainFile - tab0 <- (^. Core.coreResultTable) . snd <$> runIO' entryPoint upToCore + tab0 <- (^. Core.coreResultTable) . snd <$> runIOExclusive entryPoint upToCore let tab = etaExpansionApps tab0 case (tab ^. infoMain) >>= ((tab ^. identContext) HashMap.!?) of Just node -> do diff --git a/test/Markdown.hs b/test/Markdown.hs index 39921d5ee3..794e525463 100644 --- a/test/Markdown.hs +++ b/test/Markdown.hs @@ -38,11 +38,11 @@ testDescr PosTest {..} = _testAssertion = Steps $ \step -> do entryPoint <- defaultEntryPointIO' LockModeExclusive _dir _file step "Parsing" - p :: Parser.ParserResult <- snd <$> runIO' entryPoint upToParsing + p :: Parser.ParserResult <- snd <$> runIOExclusive entryPoint upToParsing step "Scoping" s :: Scoper.ScoperResult <- snd - <$> runIO' + <$> runIOExclusive entryPoint ( do void (entrySetup defaultDependenciesConfig) diff --git a/test/Reachability/Positive.hs b/test/Reachability/Positive.hs index cbdc665795..5eba6a3478 100644 --- a/test/Reachability/Positive.hs +++ b/test/Reachability/Positive.hs @@ -33,7 +33,7 @@ testDescr PosTest {..} = <$> defaultEntryPointIO' LockModeExclusive tRoot file' step "Pipeline up to reachability" - p :: Internal.InternalTypedResult <- snd <$> runIO' entryPoint upToInternalReachability + p :: Internal.InternalTypedResult <- snd <$> runIOExclusive entryPoint upToInternalReachability step "Check reachability results" let names = concatMap getNames (p ^. Internal.resultModules) diff --git a/test/Termination/Positive.hs b/test/Termination/Positive.hs index 31958fa0eb..c9cc023f2a 100644 --- a/test/Termination/Positive.hs +++ b/test/Termination/Positive.hs @@ -22,7 +22,7 @@ testDescr PosTest {..} = _testRoot = tRoot, _testAssertion = Single $ do entryPoint <- set entryPointNoStdlib True <$> defaultEntryPointIO' LockModeExclusive tRoot file' - (void . runIO' entryPoint) upToInternalTyped + (void . runIOExclusive entryPoint) upToInternalTyped } -------------------------------------------------------------------------------- @@ -44,7 +44,7 @@ testDescrFlag N.NegTest {..} = set entryPointNoTermination True . set entryPointNoStdlib True <$> defaultEntryPointIO' LockModeExclusive tRoot file' - (void . runIO' entryPoint) upToInternalTyped + (void . runIOExclusive entryPoint) upToInternalTyped } tests :: [PosTest] diff --git a/test/Typecheck/Positive.hs b/test/Typecheck/Positive.hs index e2c5b2c25e..b1abaaefea 100644 --- a/test/Typecheck/Positive.hs +++ b/test/Typecheck/Positive.hs @@ -29,7 +29,7 @@ testDescr PosTest {..} = _testRoot = _dir, _testAssertion = Single $ do entryPoint <- defaultEntryPointIO' LockModeExclusive _dir _file - (void . runIO' entryPoint) upToInternalTyped + (void . runIOExclusive entryPoint) upToInternalTyped } rootNegTests :: Path Abs Dir @@ -47,7 +47,7 @@ testNoPositivityFlag N.NegTest {..} = entryPoint <- set entryPointNoPositivity True <$> defaultEntryPointIO' LockModeExclusive tRoot file' - (void . runIO' entryPoint) upToInternalTyped + (void . runIOExclusive entryPoint) upToInternalTyped } negPositivityTests :: [N.NegTest] diff --git a/test/Typecheck/PositiveNew.hs b/test/Typecheck/PositiveNew.hs index e0dd59ff8e..bd588437e3 100644 --- a/test/Typecheck/PositiveNew.hs +++ b/test/Typecheck/PositiveNew.hs @@ -21,7 +21,7 @@ testDescr Old.PosTest {..} = _testRoot = _dir, _testAssertion = Single $ do entryPoint <- set entryPointNewTypeCheckingAlgorithm True <$> defaultEntryPointIO' LockModeExclusive _dir _file - (void . runIO' entryPoint) upToInternalTyped + (void . runIOExclusive entryPoint) upToInternalTyped } allTests :: TestTree