Added parsing rule for BangPattern in case expr
authorMarkus Lauer <markus.lauer@acm.org>
Mon, 18 Sep 2006 16:18:50 +0000 (16:18 +0000)
committerMarkus Lauer <markus.lauer@acm.org>
Mon, 18 Sep 2006 16:18:50 +0000 (16:18 +0000)
compiler/parser/Parser.y.pp

index f9a6945..898d45c 100644 (file)
@@ -1104,6 +1104,8 @@ alts1     :: { Located [LMatch RdrName] }
 alt    :: { LMatch RdrName }
        : infixexp opt_sig alt_rhs      {%  checkPattern $1 >>= \p ->
                                            return (LL (Match [p] $2 (unLoc $3))) }
+       | '!' infixexp opt_sig alt_rhs  {%  checkPattern $2 >>= \p ->
+                                           return (LL (Match [LL $ BangPat p] $3 (unLoc $4))) }
 
 alt_rhs :: { Located (GRHSs RdrName) }
        : ralt wherebinds               { LL (GRHSs (unLoc $1) (unLoc $2)) }