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

No need for CellValue anymore

This commit is contained in:
Timothy Clem 2018-03-02 14:59:38 -08:00
parent 515b9b64a1
commit afd18d7ab4
3 changed files with 2 additions and 12 deletions

View File

@ -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.

View File

@ -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

View File

@ -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)