1
1
mirror of https://github.com/github/semantic.git synced 2024-12-28 09:21:35 +03:00

Use sendStore to obviate the need for ScopedTypeVariables.

This commit is contained in:
Rob Rix 2018-05-31 10:11:53 -04:00
parent a994c66f0b
commit 0bf97c0395

View File

@ -1,4 +1,4 @@
{-# LANGUAGE GADTs, RankNTypes, ScopedTypeVariables, TypeFamilies, TypeOperators, UndecidableInstances #-} {-# LANGUAGE GADTs, RankNTypes, TypeFamilies, TypeOperators, UndecidableInstances #-}
module Control.Abstract.Heap module Control.Abstract.Heap
( Heap ( Heap
, getHeap , getHeap
@ -43,8 +43,8 @@ modifyHeap :: Member (State (Heap address (Cell address) value)) effects => (Hea
modifyHeap = modify' modifyHeap = modify'
alloc :: forall address value effects . Member (Store address value) effects => Name -> Evaluator address value effects address alloc :: Member (Store address value) effects => Name -> Evaluator address value effects address
alloc = send . Alloc @address @value alloc = sendStore . Alloc
-- | Dereference the given address in the heap, or fail if the address is uninitialized. -- | Dereference the given address in the heap, or fail if the address is uninitialized.
deref :: Member (Store address value) effects => address -> Evaluator address value effects value deref :: Member (Store address value) effects => address -> Evaluator address value effects value