aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortomsmeding <tom.smeding@gmail.com>2019-03-10 19:51:11 +0100
committertomsmeding <tom.smeding@gmail.com>2019-03-10 19:51:11 +0100
commit38b838eeb2bc9c150883b3f5e7f215697943296b (patch)
tree7e06b012face7732285edb1a4a76bc9ada33be91 /src
parent8384a1f7c01009ed125efee8e617da2da1f4b774 (diff)
Remove 'forget'
Diffstat (limited to 'src')
-rw-r--r--src/Main.hs8
1 files changed, 1 insertions, 7 deletions
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)