Skip to content

Commit

Permalink
fix packages
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszcz committed Sep 13, 2024
1 parent edb4d95 commit c53cac6
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/Juvix/Compiler/Pipeline/Driver.hs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import Juvix.Compiler.Pipeline.Driver.Data
import Juvix.Compiler.Pipeline.JvoCache
import Juvix.Compiler.Pipeline.Loader.PathResolver
import Juvix.Compiler.Pipeline.ModuleInfoCache
import Juvix.Compiler.Pipeline.Package (readGlobalPackage)
import Juvix.Compiler.Pipeline.Package.Loader.EvalEff (EvalFileEff)
import Juvix.Compiler.Store.Core.Extra
import Juvix.Compiler.Store.Extra qualified as Store
Expand Down Expand Up @@ -314,10 +315,15 @@ processRecursiveUpTo a = do
where
goImport :: ImportNode -> Sem r a
goImport node = do
pkgInfo <- fromJust . HashMap.lookup (node ^. importNodePackageRoot) <$> getPackageInfos
pkg <- case pkgInfo ^. packagePackage of
PackageReal p -> return p
_ -> readGlobalPackage
entry <- ask
let entry' =
entry
{ _entryPointStdin = Nothing,
{ _entryPointPackage = pkg,
_entryPointStdin = Nothing,
_entryPointModulePath = Just (node ^. importNodeAbsFile)
}
(^. pipelineResult) <$> local (const entry') (processFileUpTo a)
Expand Down

0 comments on commit c53cac6

Please sign in to comment.