Skip to content

Commit d03b02c

Browse files
committed
Handle Arr and Map cases in blitLinks
This is the function that folds over links necessary to load a value. It wasn't handling the case for arrays or the new case for maps, so it was possible to miss dependencies for those sorts of values. Then trying to load the value would fail if the runtime cache wasn't already primed with the missing dependencies.
1 parent c9c45fc commit d03b02c

File tree

1 file changed

+3
-0
lines changed
  • unison-runtime/src/Unison/Runtime

1 file changed

+3
-0
lines changed

unison-runtime/src/Unison/Runtime/ANF.hs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2340,6 +2340,9 @@ instance Referential Cont where
23402340

23412341
blitLinks :: (Monoid a) => (Bool -> ref -> a) -> BLit ref -> a
23422342
blitLinks f (List s) = foldMap (valueLinks f) s
2343+
blitLinks f (Arr a) = foldMap (valueLinks f) a
2344+
blitLinks f (Map m) =
2345+
foldMap (\(k, v) -> valueLinks f k <> valueLinks f v) m
23432346
blitLinks _ _ = mempty
23442347

23452348
instance Referential BLit where

0 commit comments

Comments
 (0)