Ticket #1817 (closed bug: fixed)

Opened 6 years ago

Last modified 4 years ago

Should be possible to specify pragmas with mixed case

Reported by: igloo Owned by: squadette
Priority: normal Milestone: 6.12.1
Component: Compiler (Parser) Version: 6.6.1
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

Reported here:  http://www.haskell.org/pipermail/glasgow-haskell-users/2007-October/013313.html

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?

Either the documentation or code should be fixed. In the thread linked to above some people spoke up in favour of supporting what the manual claims, so ideally it should be the code that is fixed.

Change History

Changed 5 years ago by simonmar

  • architecture changed from Unknown to Unknown/Multiple

Changed 5 years ago by simonmar

  • os changed from Unknown to Unknown/Multiple

Changed 4 years ago by igloo

  • milestone changed from 6.10 branch to 6.12 branch

Changed 4 years ago by squadette

  • owner set to squadette

Changed 4 years ago by squadette

Please provide feedback for the patch at:

 http://github.com/squadette/ghc/commit/8d416b7dcc96bd44a06dbcec4fa33a0edf2b4883

(could be downloaded at:  http://github.com/squadette/ghc/commit/8d416b7dcc96bd44a06dbcec4fa33a0edf2b4883.patch)

It passes all my tests, but they are not yet comprehensive. Patch to testsuite will follow.

Also, LINE pragma is not handled yet, that'll be in the updated version of the patch.

This is my first cut at hacking GHC.

Thank you,

Changed 4 years ago by igloo

  • milestone changed from 6.12 branch to 6.12.1

Thanks for the patch! I've applied it.

Leaving the ticket open as LINE isn't done yet.

Changed 4 years ago by squadette

roll back the previous patch, and apply the following:

 http://github.com/squadette/ghc/commit/5d88b71ccd31fc7f4d2f2e750fa1192dd850babf.patch

It passes ghc stage1/2 build and testsuite w/o any regression.

Thank you,

Changed 4 years ago by squadette

ok, ignore my previous comment and just apply this:

 http://github.com/squadette/ghc/commit/5a6521cc82e47c1757c498651eb6d77704a3cc48

( http://github.com/squadette/ghc/commit/5a6521cc82e47c1757c498651eb6d77704a3cc48.patch)

It contains only LINE-related changes, rebased against your stripPrefix changes.

Thank you,

Changed 4 years ago by igloo

  • status changed from new to closed
  • resolution set to fixed

Applied, thanks!

Note: See TracTickets for help on using tickets.