mirror of
https://github.com/github/semantic.git
synced 2024-12-27 00:44:57 +03:00
Extract the Precise-specific handler for Allocator.
This commit is contained in:
parent
6506aeef36
commit
3902cbfd2d
@ -29,7 +29,10 @@ runAllocator :: ( Member Fresh effects
|
|||||||
)
|
)
|
||||||
=> Evaluator Precise value (Allocator Precise ': effects) a
|
=> Evaluator Precise value (Allocator Precise ': effects) a
|
||||||
-> Evaluator Precise value effects a
|
-> Evaluator Precise value effects a
|
||||||
runAllocator = interpret $ \ (Alloc _) -> Precise <$> fresh
|
runAllocator = interpret handleAllocator
|
||||||
|
|
||||||
|
handleAllocator :: Member Fresh effects => Allocator Precise (Eff (Allocator Precise ': effects)) a -> Evaluator Precise value effects a
|
||||||
|
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
|
||||||
|
Loading…
Reference in New Issue
Block a user