summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJon French2018-05-15 17:46:10 +0100
committerJon French2018-05-15 17:46:10 +0100
commit11ac94c4b270bf8bc1c0d1aa1a852f36f0790b9b (patch)
tree12a9b053762bb72c6b54d71ee497ec7bdc6fd6fe /src
parent5be6481a1681225d72ca26f509506489fdc4e374 (diff)
rewrite_defs_guarded_pats: guards deserve rewriting too
Diffstat (limited to 'src')
-rw-r--r--src/rewrites.ml2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rewrites.ml b/src/rewrites.ml
index bba14651..b23af46a 100644
--- a/src/rewrites.ml
+++ b/src/rewrites.ml
@@ -1501,7 +1501,7 @@ let rewrite_exp_guarded_pats rewriters (E_aux (exp,(l,annot)) as full_exp) =
| Pat_aux (Pat_exp (pat, body), annot) ->
(pat, None, rewrite_rec body, annot)
| Pat_aux (Pat_when (pat, guard, body), annot) ->
- (pat, Some guard, rewrite_rec body, annot) in
+ (pat, Some (rewrite_rec guard), rewrite_rec body, annot) in
let clauses = rewrite_guarded_clauses l (List.map clause ps) in
if (effectful e) then
let e = rewrite_rec e in