mirror of
https://github.com/github/semantic.git
synced 2024-12-22 06:11:49 +03:00
No need for CellValue anymore
This commit is contained in:
parent
515b9b64a1
commit
afd18d7ab4
@ -96,16 +96,6 @@ instance AbstractEnvironment l (Value l t) where
|
||||
| Just (Interface _ env) <- prj v = env
|
||||
| otherwise = mempty
|
||||
|
||||
-- | Extract the value back out of a cell.
|
||||
class CellValue l v where
|
||||
val :: Cell l v -> v
|
||||
|
||||
instance CellValue Precise v where
|
||||
val Latest{..} = unLatest
|
||||
|
||||
instance CellValue Monovariant v where
|
||||
val = undefined
|
||||
|
||||
-- | Value types, e.g. closures, which can root a set of addresses.
|
||||
class ValueRoots l v | v -> l where
|
||||
-- | Compute the set of addresses rooted by a given value.
|
||||
|
@ -295,7 +295,7 @@ instance ( Members (Evaluating v) es
|
||||
put @(EnvironmentFor v) mempty
|
||||
|
||||
-- Evaluate the import to get it's environment.
|
||||
-- (Evaluating will have also have potentially updated the global environment).
|
||||
-- (requiring will have also have potentially updated the global environment)
|
||||
importedEnv <- require @v (qualifiedName (subterm from))
|
||||
|
||||
-- Restore previous global environment, adding the imported env
|
||||
|
@ -12,7 +12,7 @@ import Data.Abstract.Environment
|
||||
import Data.Abstract.FreeVariables
|
||||
import Data.Abstract.Store
|
||||
import Data.Abstract.Type as Type
|
||||
import Data.Abstract.Value (CellValue(..), Value, Interface(..), Closure(..), EnvironmentFor, StoreFor)
|
||||
import Data.Abstract.Value (Value, Interface(..), Closure(..), EnvironmentFor, StoreFor)
|
||||
import Data.Algebra
|
||||
import Diffing.Algorithm
|
||||
import Prelude hiding (fail)
|
||||
|
Loading…
Reference in New Issue
Block a user