File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -374,7 +374,7 @@ insertTFM tf x tfm =
374374-- then do another lookup for hash-consing the Constant term.
375375data SharedContext = SharedContext
376376 { scModuleMap :: IORef ModuleMap
377- , scTermF :: TermF Term -> IO Term
377+ , scAppCache :: AppCacheRef
378378 , scDisplayNameEnv :: IORef DisplayNameEnv
379379 , scURIEnv :: IORef (Map URI VarIndex )
380380 , scGlobalEnv :: IORef (HashMap Ident Term )
@@ -726,9 +726,9 @@ emptyAppCache :: AppCache
726726emptyAppCache = emptyTFM
727727
728728-- | Return term for application using existing term in cache if it is available.
729- getTerm :: AppCacheRef -> TermF Term -> IO Term
730- getTerm cache termF =
731- modifyMVar cache $ \ s -> do
729+ scTermF :: SharedContext -> TermF Term -> IO Term
730+ scTermF sc termF =
731+ modifyMVar (scAppCache sc) $ \ s -> do
732732 case lookupTFM termF s of
733733 Just term -> return (s, term)
734734 Nothing -> do
@@ -2567,7 +2567,7 @@ mkSharedContext = do
25672567 ur <- newIORef Map. empty
25682568 return SharedContext {
25692569 scModuleMap = mod_map_ref
2570- , scTermF = getTerm cr
2570+ , scAppCache = cr
25712571 , scNextVarIndex = vr
25722572 , scDisplayNameEnv = dr
25732573 , scURIEnv = ur
You can’t perform that action at this time.
0 commit comments