[GHC] #13918: No "warning: [-Wunrecognised-pragmas] Unrecognised pragma" when there is no name of pragmas

GHC ghc-devs at haskell.org
Mon Jul 3 19:00:19 UTC 2017


#13918: No "warning: [-Wunrecognised-pragmas] Unrecognised pragma" when there is no
name of pragmas
-------------------------------------+-------------------------------------
           Reporter:  vanto          |             Owner:  (none)
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  Compiler       |           Version:  8.0.1
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  Incorrect
  Unknown/Multiple                   |  error/warning at compile-time
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 {{{
 module Qwer where

 a = ({-# LANGUAGE #-})

 main :: IO ()
 main = print (if True then () else ())
 }}}
 if {{{a = ({-# #-})}}} then GHC compiles with a warning\\

 {{{
 qwer.hs:3:6: warning: [-Wunrecognised-pragmas] Unrecognised pragma
   |
 3 | a = ({-# #-})
   |      ^^^
 Ok, modules loaded: Qwer.
 }}}
 if you write {{{a = ({-# LANGUAGE #-})}}} without writing the name GHC
 compiles the file without specifying a warning.\\

 {{{
 *Qwer> :l qwer.hs
 [1 of 1] Compiling Qwer             ( qwer.hs, interpreted )
 Ok, modules loaded: Qwer.
 }}}
 GHCi, version 8.2.0.20170507

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


More information about the ghc-tickets mailing list