summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrian Campbell2017-11-16 11:13:53 +0000
committerBrian Campbell2017-11-20 17:57:32 +0000
commitd1b97cab625bc52e269a8562b98adca038a503a6 (patch)
treee3d626fc6f20fcca23758a05963b19c8978f62cb /src
parentc46ae4d67795682d79e737c671edec8ceee94287 (diff)
Support new nexp in mono
Diffstat (limited to 'src')
-rw-r--r--src/monomorphise.ml2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/monomorphise.ml b/src/monomorphise.ml
index 7f9eea57..1a99b3d0 100644
--- a/src/monomorphise.ml
+++ b/src/monomorphise.ml
@@ -35,6 +35,7 @@ let subst_nexp substs nexp =
| Nexp_minus (n1,n2) -> re (Nexp_minus (s_snexp n1, s_snexp n2))
| Nexp_exp ne -> re (Nexp_exp (s_snexp ne))
| Nexp_neg ne -> re (Nexp_neg (s_snexp ne))
+ | Nexp_app (id,args) -> re (Nexp_app (id,List.map s_snexp args))
in s_snexp substs nexp
let rec subst_nc substs (NC_aux (nc,l) as n_constraint) =
@@ -270,6 +271,7 @@ let rec size_nvars_nexp (Nexp_aux (ne,_)) =
| Nexp_exp n
| Nexp_neg n
-> size_nvars_nexp n
+ | Nexp_app (_,args) -> List.concat (List.map size_nvars_nexp args)
(* Given a type for a constructor, work out which refinements we ought to produce *)
(* TODO collision avoidance *)