[GHC] #8015: GHC is inconsistent about where LANGUAGE is unsupported.
GHC
ghc-devs at haskell.org
Sat Nov 22 04:03:25 UTC 2014
#8015: GHC is inconsistent about where LANGUAGE is unsupported.
-------------------------------------+-------------------------------------
Reporter: | Owner:
thoughtpolice | Status: new
Type: bug | Milestone:
Priority: normal | Version: 7.6.3
Component: Compiler | Keywords: parser
Resolution: | Architecture: Unknown/Multiple
Operating System: | Difficulty: Unknown
Unknown/Multiple | Blocked By:
Type of failure: Incorrect | Related Tickets:
warning at compile-time |
Test Case: |
Blocking: |
Differential Revisions: |
-------------------------------------+-------------------------------------
Changes (by thomie):
* difficulty: => Unknown
* failure: GHC accepts invalid program => Incorrect warning at compile-
time
Comment:
From the
[https://downloads.haskell.org/~ghc/7.8.3/docs/html/users_guide/pragmas.html
users guide]:
> "A file-header pragma must precede the module keyword in the file."
> "The file-header pragmas are: {-# LANGUAGE #-}, {-# OPTIONS_GHC #-}, and
{-# INCLUDE #-}."
So the scope of this ticket should in my opinion be: when any file-header
pragma (not only an unsupported language pragma) is used after the module
keyword, ghc should show a warning.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8015#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list