Case of "Language" pragma - bug?

Seth Kurtzberg seth at
Tue Oct 30 23:15:00 EDT 2007

-----Original Message-----
From: glasgow-haskell-users-bounces at
[mailto:glasgow-haskell-users-bounces at] On Behalf Of Robin Bate
Sent: Tuesday, October 30, 2007 3:14 PM
To: glasgow-haskell-users at
Subject: Case of "Language" pragma - bug?

I'm using GHC 6.6.1.  The manual says:

"Pragmas all take the form {-# word ... #-} where word indicates the type of
pragma, and is followed optionally by information specific to that type of
pragma. Case is ignored in word."

However, when I use "Language CPP" instead of "LANGUAGE CPP" in the pragma,
the pragma is ignored.  Is this a documentation bug?

The interesting question is which way it should work.  Obviously the
documentation should match the code, but it isn't obvious (at least to me)
whether it's better to modify the documentation or to change the behavior of
the code.

Is the behavior the same in the latest ghc release?

Seth Kurtzberg
Software Engineer
Specializing in Security, Reliability, and the Hardware/Software Interface

To test the problem, one can use "ghc --make testpragma1.hs" and "ghc --make
testpragma2.hs" on the following:

More information about the Glasgow-haskell-users mailing list