mirror of
https://github.com/github/semantic.git
synced 2025-01-04 13:34:31 +03:00
🔥 the default definition of getConfiguration.
This should enable us to wrap it s.t. using -XGeneralizedNewtypeDeriving will call overloads in downstream analyses.
This commit is contained in:
parent
a1a7b8e3cc
commit
3aa6a783cd
@ -12,6 +12,7 @@ import Control.Monad.Effect.Fresh
|
||||
import Control.Monad.Effect.NonDet
|
||||
import Control.Monad.Effect.Reader
|
||||
import Control.Monad.Effect.State
|
||||
import Data.Abstract.Configuration
|
||||
import Data.Abstract.Evaluatable
|
||||
import Data.Abstract.ModuleTable
|
||||
import Data.Abstract.Value
|
||||
@ -95,7 +96,8 @@ instance Members '[Reader (ModuleTable term), State (ModuleTable (EnvironmentFor
|
||||
askModuleTable = raise ask
|
||||
localModuleTable f a = raise (local f (lower a))
|
||||
|
||||
instance Members (EvaluatingEffects term value) effects => MonadEvaluator term value (Evaluating term value effects)
|
||||
instance Members (EvaluatingEffects term value) effects => MonadEvaluator term value (Evaluating term value effects) where
|
||||
getConfiguration term = Configuration term mempty <$> askLocalEnv <*> getStore
|
||||
|
||||
instance ( Evaluatable (Base term)
|
||||
, FreeVariables term
|
||||
|
@ -24,7 +24,6 @@ class ( MonadEnvironment value m
|
||||
=> MonadEvaluator term value m | m -> term, m -> value where
|
||||
-- | Get the current 'Configuration' with a passed-in term.
|
||||
getConfiguration :: Ord (LocationFor value) => term -> m (ConfigurationFor term value)
|
||||
getConfiguration term = Configuration term mempty <$> askLocalEnv <*> getStore
|
||||
|
||||
class Monad m => MonadEnvironment value m | m -> value where
|
||||
-- | Retrieve the global environment.
|
||||
|
Loading…
Reference in New Issue
Block a user