summaryrefslogtreecommitdiff
path: root/src/urweb.grm
diff options
context:
space:
mode:
Diffstat (limited to 'src/urweb.grm')
-rw-r--r--src/urweb.grm8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/urweb.grm b/src/urweb.grm
index 50dacf21..0f499e20 100644
--- a/src/urweb.grm
+++ b/src/urweb.grm
@@ -335,7 +335,7 @@ fun applyWindow loc e window =
fun patternOut (e : exp) =
case #1 e of
- EWild => (PWild, #2 e)
+ EWild => (PVar "_", #2 e)
| EVar ([], x, Infer) =>
if Char.isUpper (String.sub (x, 0)) then
(PCon ([], x, NONE), #2 e)
@@ -346,7 +346,7 @@ fun patternOut (e : exp) =
(PCon (xs, x, NONE), #2 e)
else
(ErrorMsg.errorAt (#2 e) "Badly capitalized constructor name in pattern";
- (PWild, #2 e))
+ (PVar "_", #2 e))
| EPrim p => (PPrim p, #2 e)
| EApp ((EVar (xs, x, Infer), _), e') =>
(PCon (xs, x, SOME (patternOut e')), #2 e)
@@ -364,7 +364,7 @@ fun patternOut (e : exp) =
| EAnnot (e', t) =>
(PAnnot (patternOut e', t), #2 e)
| _ => (ErrorMsg.errorAt (#2 e) "This is an expression but not a pattern.";
- (PWild, #2 e))
+ (PVar "_", #2 e))
%%
%header (functor UrwebLrValsFn(structure Token : TOKEN))
@@ -1543,7 +1543,7 @@ pat : patS (patS)
pterm : SYMBOL (PVar SYMBOL, s (SYMBOLleft, SYMBOLright))
| cpath (PCon (#1 cpath, #2 cpath, NONE), s (cpathleft, cpathright))
- | UNDER (PWild, s (UNDERleft, UNDERright))
+ | UNDER (PVar "_", s (UNDERleft, UNDERright))
| INT (PPrim (Prim.Int INT), s (INTleft, INTright))
| MINUS INT (PPrim (Prim.Int (~INT)), s (MINUSleft, INTright))
| STRING (PPrim (Prim.String (Prim.Normal, STRING)), s (STRINGleft, STRINGright))