1
1
mirror of https://github.com/github/semantic.git synced 2025-01-04 13:34:31 +03:00
This commit is contained in:
Rick Winfrey 2019-01-16 17:25:49 -08:00
parent 5f5df139ed
commit 5076caa2d5

View File

@ -219,7 +219,11 @@ deref :: ( Member (Deref value) sig
)
=> Slot address
-> Evaluator term address value m value
deref slot@Slot{..} = gets (Heap.getSlot slot) >>= maybeM (throwAddressError (UnallocatedSlot slot)) >>= send . flip DerefCell ret >>= maybeM (throwAddressError $ UninitializedSlot slot)
deref slot@Slot{..} = do
maybeSlotValue <- gets (Heap.getSlotValue slot)
slotValue <- maybeM (throwAddressError (UnallocatedSlot slot)) maybeSlotValue
eff <- send $ DerefCell slotValue ret
maybeM (throwAddressError $ UninitializedSlot slot) eff
putSlotDeclarationScope :: ( Member (State (Heap address address value)) sig
, Member (State (ScopeGraph address)) sig