diff --git a/src/Control/Abstract/Environment.hs b/src/Control/Abstract/Environment.hs index b169daeda..2c8225426 100644 --- a/src/Control/Abstract/Environment.hs +++ b/src/Control/Abstract/Environment.hs @@ -69,7 +69,6 @@ data Env address m return where GetEnv :: Env address m (Environment address) PutEnv :: Environment address -> Env address m () Export :: Name -> Name -> Maybe address -> Env address m () - PutEnv :: Environment address -> Env address m () instance Effect (Env address) where handleState c dist (Request (Lookup name) k) = Request (Lookup name) (dist . (<$ c) . k) @@ -79,7 +78,6 @@ instance Effect (Env address) where handleState c dist (Request GetEnv k) = Request GetEnv (dist . (<$ c) . k) handleState c dist (Request (PutEnv e) k) = Request (PutEnv e) (dist . (<$ c) . k) handleState c dist (Request (Export name alias addr) k) = Request (Export name alias addr) (dist . (<$ c) . k) - handleState c dist (Request (PutEnv e) k) = Request (PutEnv e) (dist . (<$ c) . k) runEnv :: Effects effects => Environment address diff --git a/src/Data/Abstract/Evaluatable.hs b/src/Data/Abstract/Evaluatable.hs index 17e1b3231..d1c8ff330 100644 --- a/src/Data/Abstract/Evaluatable.hs +++ b/src/Data/Abstract/Evaluatable.hs @@ -52,7 +52,6 @@ class (Show1 constr, Foldable constr) => Evaluatable constr where , Member (Env address) effects , Member (Exc (LoopControl address)) effects , Member (Exc (Return address)) effects - , Member Fresh effects , Member (Modules address) effects , Member (Reader ModuleInfo) effects , Member (Reader PackageInfo) effects @@ -155,24 +154,24 @@ instance HasPrelude 'PHP instance HasPrelude 'Python where definePrelude _ = - define "print" builtInPrint + define (name "print") builtInPrint instance HasPrelude 'Ruby where definePrelude _ = do - define "puts" builtInPrint + define (name "puts") builtInPrint defineClass (name "Object") [] $ do define (name "inspect") (lambda (const (box (string "")))) instance HasPrelude 'TypeScript where definePrelude _ = - defineNamespace "console" $ do - define "log" builtInPrint + defineNamespace (name "console") $ do + define (name "log") builtInPrint instance HasPrelude 'JavaScript where definePrelude _ = do - defineNamespace "console" $ do - define "log" builtInPrint + defineNamespace (name "console") $ do + define (name "log") builtInPrint -- Postludes diff --git a/src/Data/Abstract/Value/Abstract.hs b/src/Data/Abstract/Value/Abstract.hs index 7c0886ddc..3a4561fc4 100644 --- a/src/Data/Abstract/Value/Abstract.hs +++ b/src/Data/Abstract/Value/Abstract.hs @@ -48,7 +48,6 @@ instance ( Member (Allocator address Abstract) effects instance ( Member (Allocator address Abstract) effects , Member (Env address) effects , Member (Exc (Return address)) effects - , Member Fresh effects , Member NonDet effects , Member Fresh effects ) diff --git a/src/Semantic/Graph.hs b/src/Semantic/Graph.hs index f467cffed..f6b456f78 100644 --- a/src/Semantic/Graph.hs +++ b/src/Semantic/Graph.hs @@ -72,6 +72,7 @@ runCallGraph :: ( HasField ann Span , Evaluatable (Base term) , FreeVariables term , HasPrelude lang + , HasPostlude lang , Member Trace effs , Recursive term , Effects effs