From 4c5db78e8613611919c083d7fd96e69c728b0131 Mon Sep 17 00:00:00 2001 From: simonpj Date: Mon, 27 May 2002 10:20:20 +0000 Subject: [PATCH] [project @ 2002-05-27 10:20:20 by simonpj] Build TyDecl and ConDecl with the RdrHsSyn constructors, so the SysNames are right --- ghc/compiler/parser/ParserCore.y | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ghc/compiler/parser/ParserCore.y b/ghc/compiler/parser/ParserCore.y index c18a15a..2f6080e 100644 --- a/ghc/compiler/parser/ParserCore.y +++ b/ghc/compiler/parser/ParserCore.y @@ -74,9 +74,9 @@ tdefs :: { [RdrNameHsDecl] } tdef :: { RdrNameHsDecl } : '%data' q_tc_name tbinds '=' '{' cons1 '}' - { TyClD (TyData DataType [] $2 $3 (DataCons $6) Nothing [] noSrcLoc) } + { TyClD (mkTyData DataType ([], $2, $3) (DataCons $6) Nothing noSrcLoc) } | '%newtype' q_tc_name tbinds trep - { TyClD (TyData NewType [] $2 $3 ($4 $2 $3) Nothing [] noSrcLoc) } + { TyClD (mkTyData NewType ([], $2, $3) ($4 $2 $3) Nothing noSrcLoc) } trep :: { (RdrName -> [HsTyVarBndr RdrName] -> DataConDetails (ConDecl RdrName)) } : {- empty -} { (\ x ts -> Unknown) } @@ -146,7 +146,7 @@ cons1 :: { [ConDecl RdrName] } con :: { ConDecl RdrName } : q_d_name attbinds atys - { ConDecl $1 $1 $2 [] (VanillaCon (map unbangedType $3)) noSrcLoc} + { mkConDecl $1 $2 [] (VanillaCon (map unbangedType $3)) noSrcLoc} atys :: { [ RdrNameHsType] } : {- empty -} { [] } -- 1.7.10.4