From bf4363c03d80ae9aa376bfceb88c6137031c1236 Mon Sep 17 00:00:00 2001 From: sof Date: Sun, 3 Mar 2002 03:59:03 +0000 Subject: [PATCH] [project @ 2002-03-03 03:59:03 by sof] Along the lines of how 'unsafe' is handled, treat 'safe' and 'threadsafe' as special ids too --- ghc/compiler/parser/Parser.y | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ghc/compiler/parser/Parser.y b/ghc/compiler/parser/Parser.y index cbc0a5b..481500f 100644 --- a/ghc/compiler/parser/Parser.y +++ b/ghc/compiler/parser/Parser.y @@ -1,6 +1,6 @@ {- -*-haskell-*- ----------------------------------------------------------------------------- -$Id: Parser.y,v 1.90 2002/02/15 22:13:33 sof Exp $ +$Id: Parser.y,v 1.91 2002/03/03 03:59:03 sof Exp $ Haskell grammar. @@ -1218,6 +1218,8 @@ qvarid :: { RdrName } varid :: { RdrName } : varid_no_unsafe { $1 } | 'unsafe' { mkUnqual varName SLIT("unsafe") } + | 'safe' { mkUnqual varName SLIT("safe") } + | 'threadsafe' { mkUnqual varName SLIT("threadsafe") } varid_no_unsafe :: { RdrName } : VARID { mkUnqual varName $1 } @@ -1228,9 +1230,11 @@ tyvar :: { RdrName } : VARID { mkUnqual tvName $1 } | special_id { mkUnqual tvName $1 } | 'unsafe' { mkUnqual tvName SLIT("unsafe") } + | 'safe' { mkUnqual tvName SLIT("safe") } + | 'threadsafe' { mkUnqual tvName SLIT("threadsafe") } -- These special_ids are treated as keywords in various places, --- but as ordinary ids elsewhere. A special_id collects all thsee +-- but as ordinary ids elsewhere. 'special_id' collects all these -- except 'unsafe' and 'forall' whose treatment differs depending on context special_id :: { UserFS } special_id -- 1.7.10.4