summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
91099bf)
Haskell 98 doesn't allow extra commas in record construction/update,
so neither should GHC.
{- -*-haskell-*-
-----------------------------------------------------------------------------
{- -*-haskell-*-
-----------------------------------------------------------------------------
-$Id: Parser.y,v 1.129 2003/11/06 17:09:53 simonpj Exp $
+$Id: Parser.y,v 1.130 2003/11/26 10:07:19 simonmar Exp $
| aexp1 { $1 }
aexp1 :: { RdrNameHsExpr }
| aexp1 { $1 }
aexp1 :: { RdrNameHsExpr }
- : aexp1 '{' fbinds '}' {% (mkRecConstrOrUpdate $1 (reverse $3)) }
+ : aexp1 '{' fbinds '}' {% (mkRecConstrOrUpdate $1 (reverse $3)) }
| aexp2 { $1 }
-- Here was the syntax for type applications that I was planning
| aexp2 { $1 }
-- Here was the syntax for type applications that I was planning
-----------------------------------------------------------------------------
-- Record Field Update/Construction
-----------------------------------------------------------------------------
-- Record Field Update/Construction
-fbinds :: { RdrNameHsRecordBinds }
- : fbinds ',' fbind { $3 : $1 }
- | fbinds ',' { $1 }
- | fbind { [$1] }
+fbinds :: { RdrNameHsRecordBinds }
+ : fbinds1 { $1 }
+fbinds1 :: { RdrNameHsRecordBinds }
+ : fbinds1 ',' fbind { $3 : $1 }
+ | fbind { [$1] }
+
fbind :: { (RdrName, RdrNameHsExpr) }
: qvar '=' exp { ($1,$3) }
fbind :: { (RdrName, RdrNameHsExpr) }
: qvar '=' exp { ($1,$3) }