diff --git a/src/Control/Monad/Effect/Evaluatable.hs b/src/Control/Monad/Effect/Evaluatable.hs index 4495ad051..9367486c3 100644 --- a/src/Control/Monad/Effect/Evaluatable.hs +++ b/src/Control/Monad/Effect/Evaluatable.hs @@ -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'. diff --git a/src/Data/Abstract/Value.hs b/src/Data/Abstract/Value.hs index 2ad8f898e..f453c1824 100644 --- a/src/Data/Abstract/Value.hs +++ b/src/Data/Abstract/Value.hs @@ -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