[GHC] #13921: LANGUAGE pragma is accepted in module body

GHC ghc-devs at haskell.org
Tue Jul 4 17:08:26 UTC 2017


#13921: LANGUAGE pragma is accepted in module body
-------------------------------------+-------------------------------------
           Reporter:  bgamari        |             Owner:  (none)
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  Compiler       |           Version:  8.0.1
  (Parser)                           |
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 As pointed out in #13918, the
 [[https://www.haskell.org/onlinereport/haskell2010/haskellch12.html#x19-19100012.3|Haskell
 Report]] stipulates that,

 > The LANGUAGE pragma is a file-header pragma. A file-header pragma must
 precede the module keyword in a source file.

 However, GHC accepts this program,
 {{{#!hs
 module Hi where

 h = {-# LANGUAGE BangPatterns #-} 0
 }}}

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13921>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list