mirror of
https://github.com/github/semantic.git
synced 2024-12-22 14:21:31 +03:00
Remove MonadEnv
This commit is contained in:
parent
bae3f74e0f
commit
3f364fe78f
@ -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
|
||||
|
@ -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
|
Loading…
Reference in New Issue
Block a user