From: simonpj Date: Mon, 22 Oct 2001 09:37:24 +0000 (+0000) Subject: [project @ 2001-10-22 09:37:24 by simonpj] X-Git-Tag: Approximately_9120_patches~767 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=e0f44735eb8fd4d078ffe11f396c3ab47e0b276e;hp=b01bb1ca7903c64668c541146a9d85d0b8e2e26f;p=ghc-hetmet.git [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". --- 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] }