From e0f44735eb8fd4d078ffe11f396c3ab47e0b276e Mon Sep 17 00:00:00 2001 From: simonpj Date: Mon, 22 Oct 2001 09:37:24 +0000 Subject: [PATCH] [project @ 2001-10-22 09:37:24 by simonpj] ------------------------------------ Allow foralls in newtype-with-record ------------------------------------ MERGE WITH STABLE BRANCH A simple fix to a longstanding omission. The parser rejected newtype CPS a = CPS { unCPS :: forall ans . (a -> ans) -> ans } because the production for "newconstr" said "type" instead of "ctype". --- ghc/compiler/parser/Parser.y | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ghc/compiler/parser/Parser.y b/ghc/compiler/parser/Parser.y index efe3934..e57973e 100644 --- a/ghc/compiler/parser/Parser.y +++ b/ghc/compiler/parser/Parser.y @@ -1,6 +1,6 @@ {- ----------------------------------------------------------------------------- -$Id: Parser.y,v 1.74 2001/09/26 15:12:35 simonpj Exp $ +$Id: Parser.y,v 1.75 2001/10/22 09:37:24 simonpj Exp $ Haskell grammar. @@ -607,7 +607,7 @@ varids0 :: { [RdrName] } newconstr :: { RdrNameConDecl } : srcloc conid atype { mkConDecl $2 [] [] (VanillaCon [unbangedType $3]) $1 } - | srcloc conid '{' var '::' type '}' + | srcloc conid '{' var '::' ctype '}' { mkConDecl $2 [] [] (RecCon [([$4], unbangedType $6)]) $1 } constrs :: { [RdrNameConDecl] } -- 1.7.10.4