From: Markus Lauer Date: Mon, 18 Sep 2006 16:18:50 +0000 (+0000) Subject: Added parsing rule for BangPattern in case expr X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=a8839bb4c0a25a961ea315fa2cfdcc78b44b8878 Added parsing rule for BangPattern in case expr --- diff --git a/compiler/parser/Parser.y.pp b/compiler/parser/Parser.y.pp index f9a6945..898d45c 100644 --- a/compiler/parser/Parser.y.pp +++ b/compiler/parser/Parser.y.pp @@ -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)) }