1
1
mirror of https://github.com/github/semantic.git synced 2024-12-22 14:21:31 +03:00

Remove MonadEnv

This commit is contained in:
Timothy Clem 2018-02-23 11:35:58 -08:00
parent bae3f74e0f
commit 3f364fe78f
2 changed files with 0 additions and 20 deletions

View File

@ -35,7 +35,6 @@ library
, Control.Monad.Effect.Addressable
, Control.Monad.Effect.Cache
, Control.Monad.Effect.Dead
, Control.Monad.Effect.Env
, Control.Monad.Effect.Evaluatable
, Control.Monad.Effect.Fresh
, Control.Monad.Effect.GC

View File

@ -1,19 +0,0 @@
{-# LANGUAGE MultiParamTypeClasses, TypeOperators, UndecidableInstances #-}
module Control.Monad.Effect.Env where
import Control.Monad.Effect
import Control.Monad.Effect.Reader
import Data.Abstract.Environment
import Data.Abstract.Value
-- | 'Monad's offering a local environment binding variable names to addresses.
class Monad m => MonadEnv value m where
-- | Retrieve the local environment.
askEnv :: m (Environment (LocationFor value) value)
-- | Run a computation with a locally-modified environment.
localEnv :: (Environment (LocationFor value) value -> Environment (LocationFor value) value) -> m b -> m b
instance (Reader (Environment (LocationFor value) value) :< fs) => MonadEnv value (Eff fs) where
askEnv = ask
localEnv = local