From: Ian Lynagh Date: Fri, 6 Mar 2009 19:48:26 +0000 (+0000) Subject: Add CONTRACT to the pragmas that we recognise. X-Git-Tag: 2009-03-13~12 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=f2fd487da87fcf55b6f04f06a84cb567af6a2104;p=ghc-hetmet.git Add CONTRACT to the pragmas that we recognise. It's used by ESC/Haskell. --- diff --git a/compiler/parser/Lexer.x b/compiler/parser/Lexer.x index b3b2336..07ee66f 100644 --- a/compiler/parser/Lexer.x +++ b/compiler/parser/Lexer.x @@ -271,7 +271,7 @@ $tab+ { warn Opt_WarnTabs (text "Tab character") } -- We ignore all these pragmas, but don't generate a warning for them -- CFILES is a hugs-only thing. - "{-#" $whitechar* (OPTIONS_(HUGS|hugs|NHC98|nhc98|JHC|jhc|YHC|yhc|CATCH|catch|DERIVE|derive)|CFILES|cfiles) / { notFollowedByPragmaChar } + "{-#" $whitechar* (OPTIONS_(HUGS|hugs|NHC98|nhc98|JHC|jhc|YHC|yhc|CATCH|catch|DERIVE|derive)|CFILES|cfiles|CONTRACT|contract) / { notFollowedByPragmaChar } { nested_comment lexToken } -- ToDo: should only be valid inside a pragma: