summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristopher Pulte2015-10-05 15:32:45 +0100
committerChristopher Pulte2015-10-05 15:32:45 +0100
commit62696d2137c61773822a6774fd035bed08a12416 (patch)
tree77a975ad50f50a25fad96e4bd6711521b4d74491 /src
parentba763cbaf1cb23044cb74c296785ac6757b3a3fe (diff)
some fixes
Diffstat (limited to 'src')
-rw-r--r--src/rewriter.ml8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/rewriter.ml b/src/rewriter.ml
index b8034ba0..c598d6ef 100644
--- a/src/rewriter.ml
+++ b/src/rewriter.ml
@@ -636,7 +636,7 @@ let remove_vector_concat_pat pat =
let wild _ = P_aux (P_wild,(Parse_ast.Unknown,simple_annot {t = Tid "bit"})) in
acc @ (List.map wild (range 0 ((int_of_big_int length) - 1)))
| _,(l,_) -> raise (Reporting_basic.err_unreachable l "Non-vector in vector-concat pattern") in
- P_vector_concat (List.fold_left aux [] ps) in
+ P_vector (List.fold_left aux [] ps) in
{id_pat_alg with p_vector_concat = p_vector_concat} in
let pat = fold_pat remove_vector_concats pat in
@@ -672,7 +672,9 @@ let rewrite_fun_remove_vector_concat_pat
in FD_aux (FD_function(recopt,tannotopt,effectopt,List.map rewrite_funcl funcls),(l,fdannot))
let rewrite_defs_remove_vector_concat_pat rewriters (Defs defs) =
- let rewrite_def d = match d with
+ let rewrite_def d =
+ let d = rewriters.rewrite_def rewriters d in
+ match d with
| DEF_val (LB_aux (LB_val_explicit (t,pat,exp),a)) ->
let (pat,letbinds,_) = remove_vector_concat_pat pat in
let defvals = List.map (fun lb -> DEF_val lb) letbinds in
@@ -681,7 +683,7 @@ let rewrite_defs_remove_vector_concat_pat rewriters (Defs defs) =
let (pat,letbinds,_) = remove_vector_concat_pat pat in
let defvals = List.map (fun lb -> DEF_val lb) letbinds in
[DEF_val (LB_aux (LB_val_implicit (pat,exp),a))] @ defvals
- | _ -> [d] in
+ | d -> [rewriters.rewrite_def rewriters d] in
Defs (List.flatten (List.map rewrite_def defs))
let rewrite_defs_remove_vector_concat defs = rewrite_defs_base