X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Fparser%2FParser.y;h=a4a8f9c45eccfd12fd0183bcc57968d9ab1aea93;hb=64446dd5789404eec3c3aff3e92b5435d2c7b587;hp=c9bcf45f09b8221ae4f05850a226e6ac780f8f5c;hpb=7ff3d6a07f27b854e0d4b54ba8aa0b3c5ffc81a5;p=ghc-hetmet.git diff --git a/ghc/compiler/parser/Parser.y b/ghc/compiler/parser/Parser.y index c9bcf45..a4a8f9c 100644 --- a/ghc/compiler/parser/Parser.y +++ b/ghc/compiler/parser/Parser.y @@ -1,6 +1,6 @@ {- -*-haskell-*- ----------------------------------------------------------------------------- -$Id: Parser.y,v 1.127 2003/10/21 12:54:21 simonpj Exp $ +$Id: Parser.y,v 1.128 2003/11/04 13:14:06 simonpj Exp $ Haskell grammar. @@ -939,12 +939,8 @@ scc_annot :: { FastString } : '_scc_' STRING { $2 } | '{-# SCC' STRING '#-}' { $2 } -ccallid :: { FastString } - : VARID { $1 } - | CONID { $1 } - fexp :: { RdrNameHsExpr } - : fexp aexp { (HsApp $1 $2) } + : fexp aexp { HsApp $1 $2 } | aexp { $1 } reifyexp :: { HsReify RdrName } @@ -953,9 +949,6 @@ reifyexp :: { HsReify RdrName } | REIFY_TYPE qcname { Reify ReifyType $2 } | REIFY_FIXITY qcname { Reify ReifyFixity $2 } -aexps0 :: { [RdrNameHsExpr] } - : aexps { reverse $1 } - aexps :: { [RdrNameHsExpr] } : aexps aexp { $2 : $1 } | {- empty -} { [] } @@ -974,7 +967,7 @@ aexp1 :: { RdrNameHsExpr } -- so it's not enabled yet. -- But this case *is* used for the left hand side of a generic definition, -- which is parsed as an expression before being munged into a pattern - | qcname '{|' gentype '|}' { (HsApp (HsVar $1) (HsType $3)) } + | qcname '{|' gentype '|}' { (HsApp (HsVar $1) (HsType $3)) } aexp2 :: { RdrNameHsExpr } : ipvar { HsIPVar $1 } @@ -1171,10 +1164,6 @@ fbind :: { (RdrName, RdrNameHsExpr) } ----------------------------------------------------------------------------- -- Implicit Parameter Bindings -dbinding :: { [(IPName RdrName, RdrNameHsExpr)] } - : '{' dbinds '}' { $2 } - | vocurly dbinds close { $2 } - dbinds :: { [(IPName RdrName, RdrNameHsExpr)] } : dbinds ';' dbind { $3 : $1 } | dbinds ';' { $1 }