1
0
forked from GitHub/gf-core

reload command in shell

This commit is contained in:
aarne
2011-08-25 15:58:38 +00:00
parent 1fccece30c
commit 6757ab2b41
3 changed files with 21 additions and 6 deletions

View File

@@ -665,6 +665,10 @@ allCommands env@(pgf, mos) = Map.fromList [
longname = "quit",
synopsis = "exit GF interpreter"
}),
("r", emptyCommandInfo {
longname = "reload",
synopsis = "repeat the latest import command"
}),
("rf", emptyCommandInfo {
longname = "read_file",
synopsis = "read string or tree input from a file",

View File

@@ -65,7 +65,7 @@ computeTermOpt rec gr = comput True where
return $ lookup x g
case t' of
_ | t == t' -> return t
_ -> comp g t'
_ -> comp g t' --- why compute again? AR 25/8/2011
-- Abs x@(IA _) b -> do
Abs _ _ _ | full -> do -- \xs -> b
@@ -391,7 +391,7 @@ computeTermOpt rec gr = comput True where
ps0 <- mapM (compPatternMacro . fst) cs
cs' <- mapM (compBranch g) (zip ps0 (map snd cs))
----- cs' <- return (zip ps0 (map snd cs)) --- probably right AR 22/8/2011
----- cs' <- return (zip ps0 (map snd cs)) --- probably right AR 22/8/2011 but can leave uninstantiated variables :-(
---- cs' <- mapM (compBranch g) cs
return $ T i cs' -- happens with variable types