1
1
mirror of https://github.com/github/semantic.git synced 2025-01-01 19:55:34 +03:00

And some more type parameters.

This commit is contained in:
Rob Rix 2018-03-14 11:21:35 -04:00
parent 601c3b97d8
commit b8a3bd72f0

View File

@ -15,10 +15,10 @@ import Data.Semigroup.Reducer
import Prelude hiding (fail)
-- | Defines 'alloc'ation and 'deref'erencing of 'Address'es in a Store.
class (Monad m, Ord l, l ~ LocationFor value, Reducer value (Cell l value)) => MonadAddressable l value m where
deref :: Address l value -> m value
class (Monad m, Ord location, location ~ LocationFor value, Reducer value (Cell location value)) => MonadAddressable location value m where
deref :: Address location value -> m value
alloc :: Name -> m (Address l value)
alloc :: Name -> m (Address location value)
-- | Look up or allocate an address for a 'Name' free in a given term & assign it a given value, returning the 'Name' paired with the address.
--