Commit 10b5e6c6 authored by Andrei Paskevich's avatar Andrei Paskevich
Browse files

bugfix in eliminate_algebraic

parent ebe0622b
......@@ -38,8 +38,10 @@ let uncompiled = "eliminate_algebraic: compile_match required"
let rec rewriteT kn state t = match t.t_node with
| Tcase ([t1],bl) ->
let t1 = rewriteT kn state t1 in
let mk_br (w,m) br =
let (pl,e) = t_open_branch br in
let e = rewriteT kn state e in
match pl with
| [{ pat_node = Papp (cs,pl) }] ->
let add_var e p pj = match p.pat_node with
......@@ -66,8 +68,10 @@ let rec rewriteT kn state t = match t.t_node with
and rewriteF kn state f = match f.f_node with
| Fcase ([t1],bl) ->
let t1 = rewriteT kn state t1 in
let mk_br (w,m) br =
let (pl,e) = f_open_branch br in
let e = rewriteF kn state e in
match pl with
| [{ pat_node = Papp (cs,pl) }] ->
let add_var e p pj = match p.pat_node with
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment