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

Rename v to value.

This commit is contained in:
Rob Rix 2018-02-27 16:11:00 -05:00
parent f8a2d24ab2
commit 08df6a2f46
2 changed files with 6 additions and 3 deletions

View File

@ -25,9 +25,9 @@ import qualified Data.Union as U
-- | The 'Evaluatable' class defines the necessary interface for a term to be evaluated. While a default definition of 'eval' is given, instances with computational content must implement 'eval' to perform their small-step operational semantics.
class Evaluatable es term v constr where
eval :: FreeVariables term => SubtermAlgebra constr term (Eff es v)
default eval :: (Fail :< es, FreeVariables term, Show1 constr) => SubtermAlgebra constr term (Eff es v)
class Evaluatable es term value constr where
eval :: (FreeVariables term) => SubtermAlgebra constr term (Eff es value)
default eval :: (Fail :< es, FreeVariables term, Show1 constr) => SubtermAlgebra constr term (Eff es value)
eval expr = fail $ "Eval unspecialized for " ++ liftShowsPrec (const (const id)) (const id) 0 expr ""
-- | If we can evaluate any syntax which can occur in a 'Union', we can evaluate the 'Union'.

View File

@ -110,6 +110,8 @@ class AbstractValue t v | v -> t where
-- | Construct an abstract string value.
string :: ByteString -> v
-- abstract :: Monad m => [Name] -> (t, m v) -> m v
-- Instances
@ -125,6 +127,7 @@ instance AbstractValue term (Value location term) where
integer = inj . Integer
boolean = inj . Boolean
string = inj . String
-- abstract names (term, _) = inj . Closure names term <$> ask
instance ValueRoots Monovariant (Type.Type term) where
valueRoots _ = mempty