summaryrefslogtreecommitdiff
path: root/monkey/edits.py
diff options
context:
space:
mode:
Diffstat (limited to 'monkey/edits.py')
-rw-r--r--monkey/edits.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/monkey/edits.py b/monkey/edits.py
index 480af5f..bf6560d 100644
--- a/monkey/edits.py
+++ b/monkey/edits.py
@@ -194,6 +194,11 @@ def get_edits_from_traces(traces):
start = normalize(path[i-1], var_names)
end = normalize(path[i], var_names)
+ # Disallow edits that insert a whole rule (a → … :- …).
+ # TODO improve edit_graph to handle this.
+ if 'FROM' in [t.type for t in end[:-1]]:
+ continue
+
# This should always succeed but check anyway.
if start != end:
edit = (start, end)