summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrian Campbell2018-01-29 09:00:26 +0000
committerBrian Campbell2018-01-29 09:00:26 +0000
commit4e4420f00984c11782445210709e665370e99358 (patch)
tree82c86d525f34c1476e1109444d5a87aeb21674b1 /src
parentf6b35a7dba6acad62afb9d481e2bf2dfdbc312b4 (diff)
Avoid generating (_ as n) in mono, broke atom type rewriting
Diffstat (limited to 'src')
-rw-r--r--src/monomorphise.ml6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/monomorphise.ml b/src/monomorphise.ml
index 745b40e4..d911e537 100644
--- a/src/monomorphise.ml
+++ b/src/monomorphise.ml
@@ -1509,7 +1509,11 @@ let split_defs continue_anyway splits defs =
p,[id,E_aux (E_lit lit,(Generated pl,pannot))],[l,(i,[])]
| _ ->
let p',subst = freshen_pat_bindings p in
- P_aux (P_as (p',id),(l,annot)),[],[l,(i,subst)])
+ match p' with
+ | P_aux (P_wild,_) ->
+ P_aux (P_id id,(l,annot)),[],[l,(i,subst)]
+ | _ ->
+ P_aux (P_as (p',id),(l,annot)),[],[l,(i,subst)])
pats)
)
| P_app (id,ps) ->