mirror of
https://github.com/github/semantic.git
synced 2024-12-27 17:05:33 +03:00
Extract the Precise-specific handler for Deref.
This commit is contained in:
parent
3902cbfd2d
commit
137aabc77a
@ -37,6 +37,8 @@ handleAllocator (Alloc _) = Precise <$> fresh
|
|||||||
runDeref :: PureEffects effects
|
runDeref :: PureEffects effects
|
||||||
=> Evaluator Precise value (Deref Precise value ': effects) a
|
=> Evaluator Precise value (Deref Precise value ': effects) a
|
||||||
-> Evaluator Precise value effects a
|
-> Evaluator Precise value effects a
|
||||||
runDeref = interpret $ \case
|
runDeref = interpret handleDeref
|
||||||
DerefCell _ cell -> pure (fst <$> Set.minView cell)
|
|
||||||
AssignCell _ value _ -> pure (Set.singleton value)
|
handleDeref :: Deref Precise value (Eff (Deref Precise value ': effects)) a -> Evaluator Precise value effects a
|
||||||
|
handleDeref (DerefCell _ cell) = pure (fst <$> Set.minView cell)
|
||||||
|
handleDeref (AssignCell _ value _) = pure (Set.singleton value)
|
||||||
|
Loading…
Reference in New Issue
Block a user