1
1
mirror of https://github.com/github/semantic.git synced 2025-01-02 20:41:38 +03:00

📝 MonadEnv.

This commit is contained in:
Rob Rix 2017-12-21 10:51:53 -05:00
parent 2b26a58ae0
commit 46448c356a

View File

@ -6,6 +6,7 @@ import Control.Monad.Effect.Reader
import Data.Abstract.Environment import Data.Abstract.Environment
import Data.Abstract.Value import Data.Abstract.Value
-- | 'Monad's offering a local environment binding variable names to addresses.
class Monad m => MonadEnv value m where class Monad m => MonadEnv value m where
askEnv :: m (Environment (LocationFor value) value) askEnv :: m (Environment (LocationFor value) value)
localEnv :: (Environment (LocationFor value) value -> Environment (LocationFor value) value) -> m b -> m b localEnv :: (Environment (LocationFor value) value -> Environment (LocationFor value) value) -> m b -> m b