summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/urweb.grm4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/urweb.grm b/src/urweb.grm
index 2a3fe283..afebff0a 100644
--- a/src/urweb.grm
+++ b/src/urweb.grm
@@ -636,6 +636,10 @@ decl : CON SYMBOL cargl2 kopt EQ cexp (let
let
val t = Option.getOpt (copt, (CWild (KType, loc), loc))
val (e, t) = #2 eargl2 (eexp, t)
+ val pat =
+ case #1 t of
+ CWild _ => pat
+ | _ => (PAnnot (pat, t), loc)
in
[(DVal (pat, e), loc)]
end