X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Fparser%2FParser.y.pp;h=eec611675970a9de96e239a2576a99132b39ad04;hp=ffc1f44053a3a3a534cbf361ecc5e07d3ea9dbd8;hb=e13260bd595e518425a7f36ba34ca3297974cae8;hpb=90dc9026b091be5cca5da4c6cbd3713ecc493361 diff --git a/compiler/parser/Parser.y.pp b/compiler/parser/Parser.y.pp index ffc1f44..eec6116 100644 --- a/compiler/parser/Parser.y.pp +++ b/compiler/parser/Parser.y.pp @@ -52,6 +52,17 @@ import Control.Monad ( mplus ) {- ----------------------------------------------------------------------------- +24 Februar 2006 + +Conflicts: 33 shift/reduce + 1 reduce/reduce + +The reduce/reduce conflict is weird. It's between tyconsym and consym, and I +would think the two should never occur in the same context. + + -=chak + +----------------------------------------------------------------------------- 31 December 2006 Conflicts: 34 shift/reduce @@ -1309,7 +1320,7 @@ aexp :: { LHsExpr RdrName } aexp1 :: { LHsExpr RdrName } : aexp1 '{' fbinds '}' {% do { r <- mkRecConstrOrUpdate $1 (comb2 $2 $4) - (reverse $3); + $3; return (LL r) }} | aexp2 { $1 } @@ -1434,12 +1445,12 @@ quals :: { Located [LStmt RdrName] } parr :: { LHsExpr RdrName } : { noLoc (ExplicitPArr placeHolderType []) } - | exp { L1 $ ExplicitPArr placeHolderType [$1] } + | texp { L1 $ ExplicitPArr placeHolderType [$1] } | lexps { L1 $ ExplicitPArr placeHolderType (reverse (unLoc $1)) } - | exp '..' exp { LL $ PArrSeq noPostTcExpr (FromTo $1 $3) } - | exp ',' exp '..' exp { LL $ PArrSeq noPostTcExpr (FromThenTo $1 $3 $5) } - | exp pquals { sL (comb2 $1 $>) $ mkHsDo PArrComp (reverse (unLoc $2)) $1 } + | texp '..' exp { LL $ PArrSeq noPostTcExpr (FromTo $1 $3) } + | texp ',' exp '..' exp { LL $ PArrSeq noPostTcExpr (FromThenTo $1 $3 $5) } + | texp pquals { sL (comb2 $1 $>) $ mkHsDo PArrComp (reverse (unLoc $2)) $1 } -- We are reusing `lexps' and `pquals' from the list case. @@ -1535,10 +1546,10 @@ qual :: { LStmt RdrName } -- Record Field Update/Construction fbinds :: { HsRecordBinds RdrName } - : fbinds1 { $1 } - | {- empty -} { [] } + : fbinds1 { HsRecordBinds (reverse $1) } + | {- empty -} { HsRecordBinds [] } -fbinds1 :: { HsRecordBinds RdrName } +fbinds1 :: { [(Located id, LHsExpr id)] } : fbinds1 ',' fbind { $3 : $1 } | fbind { [$1] }