diff options
author | Geoffrey Mainland <mainland@apeiron.net> | 2013-04-24 15:31:43 +0100 |
---|---|---|
committer | Geoffrey Mainland <mainland@apeiron.net> | 2013-10-04 14:58:07 -0400 |
commit | 639714ba46dea27934da4e4cc73330a2ea8ee9de (patch) | |
tree | 98822ffd4da1ad3b932e38a3fd7f4a8022741dd1 /compiler/parser/Parser.y.pp | |
parent | 96456c694d9b50fe2812b0703367ace7b7e97bed (diff) | |
download | haskell-639714ba46dea27934da4e4cc73330a2ea8ee9de.tar.gz |
Differentiate typed and untyped splices and brackets in the abstract syntax.
Diffstat (limited to 'compiler/parser/Parser.y.pp')
-rw-r--r-- | compiler/parser/Parser.y.pp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/parser/Parser.y.pp b/compiler/parser/Parser.y.pp index c0eb7a61f0..eb7a4b2cdf 100644 --- a/compiler/parser/Parser.y.pp +++ b/compiler/parser/Parser.y.pp @@ -1556,10 +1556,10 @@ aexp2 :: { LHsExpr RdrName } (L1 $ HsVar (mkUnqual varName (getTH_ID_SPLICE $1)))) } | '$(' exp ')' { LL $ HsSpliceE (mkHsSplice $2) } - | TH_ID_TY_SPLICE { L1 $ HsSpliceE (mkHsSplice + | TH_ID_TY_SPLICE { L1 $ HsSpliceE (mkHsTExpSplice (L1 $ HsVar (mkUnqual varName (getTH_ID_TY_SPLICE $1)))) } - | '$$(' exp ')' { LL $ HsSpliceE (mkHsSplice $2) } + | '$$(' exp ')' { LL $ HsSpliceE (mkHsTExpSplice $2) } | SIMPLEQUOTE qvar { LL $ HsBracket (VarBr True (unLoc $2)) } @@ -1567,7 +1567,7 @@ aexp2 :: { LHsExpr RdrName } | TH_TY_QUOTE tyvar { LL $ HsBracket (VarBr False (unLoc $2)) } | TH_TY_QUOTE gtycon { LL $ HsBracket (VarBr False (unLoc $2)) } | '[|' exp '|]' { LL $ HsBracket (ExpBr $2) } - | '[||' exp '||]' { LL $ HsBracket (ExpBr $2) } + | '[||' exp '||]' { LL $ HsBracket (TExpBr $2) } | '[t|' ctype '|]' { LL $ HsBracket (TypBr $2) } | '[p|' infixexp '|]' {% checkPattern empty $2 >>= \p -> return (LL $ HsBracket (PatBr p)) } |