From 38b838eeb2bc9c150883b3f5e7f215697943296b Mon Sep 17 00:00:00 2001 From: tomsmeding Date: Sun, 10 Mar 2019 19:51:11 +0100 Subject: Remove 'forget' --- src/Main.hs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'src') diff --git a/src/Main.hs b/src/Main.hs index d3898de..bcb1f00 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -46,8 +46,7 @@ data Context = Context { cStack :: [(Action, Env)], cBaseEnv :: Env } data Action = Action Cmd Name deriving (Show) -data Cmd = CForget - | CRewrite Name +data Cmd = CRewrite Name | CBeta | CEta | CCase @@ -71,7 +70,6 @@ instance Pretty Action where pretty (Action cmd target) = "action " ++ target ++ " " ++ pretty cmd instance Pretty Cmd where - pretty CForget = "forget" pretty (CRewrite name) = "rew " ++ name pretty CBeta = "beta" pretty CEta = "eta" @@ -105,9 +103,6 @@ repeatTrans f expr = apply :: Context -> Action -> Either String Context apply ctx act@(Action cmd target) = case cmd of - CForget -> do - env' <- forget (topEnv ctx) target - return $ pushCtx (act, env') ctx CRewrite name -> genTransform (\env -> liftM2 (,) (get env name) (get env target)) (\(repl, expr) -> normalise $ rewrite name repl expr) CRepeat subcmd -> case exprTransformer subcmd of @@ -205,7 +200,6 @@ parseCmd ["env"] = Right CShowEnv parseCmd ["focus"] = Right CUnFocus parseCmd ["focus", name] = Right (CFocus name) parseCmd ["log"] = Right CLog -parseCmd ["forget"] = Right (UCCmd CForget) parseCmd ["rew", func] = Right (UCCmd (CRewrite func)) parseCmd ["beta"] = Right (UCCmd CBeta) parseCmd ["eta"] = Right (UCCmd CEta) -- cgit v1.2.3-70-g09d2