1
1
mirror of https://github.com/github/semantic.git synced 2024-12-14 08:25:32 +03:00

🔥 value.

This commit is contained in:
Rob Rix 2018-12-10 11:36:27 -05:00
parent 8e585284f6
commit a53e883b55

View File

@ -24,7 +24,6 @@ module Control.Abstract.Value
, While(..) , While(..)
, runWhile , runWhile
, WhileC(..) , WhileC(..)
, value
) where ) where
import Control.Abstract.Evaluator import Control.Abstract.Evaluator
@ -35,7 +34,6 @@ import Data.Abstract.BaseError
import Data.Abstract.Module import Data.Abstract.Module
import Data.Abstract.Name import Data.Abstract.Name
import Data.Abstract.Number as Number import Data.Abstract.Number as Number
import Data.Abstract.Ref
import Data.Scientific (Scientific) import Data.Scientific (Scientific)
import Data.Span import Data.Span
import Prologue hiding (TypeError) import Prologue hiding (TypeError)
@ -288,18 +286,3 @@ class AbstractIntro value => AbstractValue term address value carrier where
scopedEnvironment :: value -> Evaluator term address value carrier (Maybe address) scopedEnvironment :: value -> Evaluator term address value carrier (Maybe address)
object :: address -> Evaluator term address value carrier value object :: address -> Evaluator term address value carrier value
-- | Evaluates a 'Value' returning the referenced value
value :: ( Member (Deref value) sig
, Member (Reader ModuleInfo) sig
, Member (Reader Span) sig
, Member (Resumable (BaseError (AddressError address value))) sig
, Member (State (Heap address address value)) sig
, Carrier sig m
, Ord address
)
=> ValueRef address value
-> Evaluator term address value m value
value (Rval val) = pure val
value (LvalMember slot) = deref slot