added the "alter lin" command

This commit is contained in:
Krasimir Angelov
2023-03-07 15:29:58 +01:00
parent c7e988dacf
commit 9dc36a0f5f
9 changed files with 108 additions and 18 deletions

View File

@@ -716,6 +716,20 @@ pgfCommands = Map.fromList [
],
needsTypeCheck = False
}),
("a", emptyCommandInfo {
longname = "alter",
syntax = "alter lin f = ..",
synopsis = "Dynamically updates the linearization of a function in the current grammar.",
explanation = unlines [
"The syntax is the same as if the definition was in a module. If you want to use",
"any operations inside the lin definition, you should import them",
"by using the command `i -resource <file path>`."
],
flags = [
("lang","the language in which to alter the lin")
],
needsTypeCheck = False
}),
("d", emptyCommandInfo {
longname = "drop",
syntax = "drop fun f; drop cat c; drop concrete l; drop lin c; or drop lincat c",