summaryrefslogtreecommitdiff
path: root/src/parser.mly
diff options
context:
space:
mode:
authorJon French2018-08-24 13:36:35 +0100
committerJon French2018-08-24 13:37:02 +0100
commit540959cc117c795d73f6a84673276316f82e92b0 (patch)
treeb227d3bd1a24e91f4700081e290014f721715321 /src/parser.mly
parentebf4dfb35d98431d7fd30da46d082927975b0ef1 (diff)
parser: emit actual unit for an ident() pattern, not wildcard which causes unnecessary problems with mappings/pat_to_exp
Diffstat (limited to 'src/parser.mly')
-rw-r--r--src/parser.mly2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/parser.mly b/src/parser.mly
index 4d2b6230..4ebfe16e 100644
--- a/src/parser.mly
+++ b/src/parser.mly
@@ -713,7 +713,7 @@ atomic_pat:
{ mk_pat (P_var (mk_pat (P_id (id_of_kid $1)) $startpos $endpos,
mk_typ (ATyp_var $1) $startpos $endpos)) $startpos $endpos }
| id Unit
- { mk_pat (P_app ($1, [mk_pat P_wild $startpos $endpos])) $startpos $endpos }
+ { mk_pat (P_app ($1, [mk_pat (P_lit (mk_lit L_unit $startpos $endpos)) $startpos $endpos])) $startpos $endpos }
| id Lparen pat_list Rparen
{ mk_pat (P_app ($1, $3)) $startpos $endpos }
| atomic_pat Colon typ