[GHC] #8015: GHC is inconsistent about where LANGUAGE is unsupported.

#8015: GHC is inconsistent about where LANGUAGE is unsupported. ----------------------------------------+----------------------------------- Reporter: thoughtpolice | Owner: Type: bug | Status: new Priority: normal | Component: Compiler Version: 7.6.3 | Keywords: parser Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: GHC accepts invalid program | Blockedby: Blocking: | Related: ----------------------------------------+----------------------------------- Consider the following file: {{{ {-# LANGUAGE NOINLINE foo bar #-} module Main where main :: IO () main = return () }}} We'd expect this error to occur: {{{ $ ~/ghc/ghc-work/inplace/bin/ghc-stage2 --interactive /tmp/tester.hs GHCi, version 7.7.20130624: http://www.haskell.org/ghc/ :? for help Loading package ghc-prim ... linking ... done. Loading package integer-gmp ... linking ... done. Loading package base ... linking ... done. /tmp/tester.hs:1:14: Unsupported extension: NOINLINE Failed, modules loaded: none. Prelude> }}} Now consider: {{{ module Main where {-# LANGUAGE NOINLINE foo bar #-} main :: IO () main = return () }}} And: {{{ ~/ghc/ghc-work/inplace/bin/ghc-stage2 --interactive /tmp/tester.hs GHCi, version 7.7.20130624: http://www.haskell.org/ghc/ :? for help Loading package ghc-prim ... linking ... done. Loading package integer-gmp ... linking ... done. Loading package base ... linking ... done. [1 of 1] Compiling Main ( /tmp/tester.hs, interpreted ) Ok, modules loaded: Main. *Main> }}} Something like this actually slipped into base and was fixed. See Gabor's commit 100c051 which fixed it. I was going to attempt to fix this myself but I (probably rightly) backed away a little as I understand the code more. This ticket can keep track of it, regardless of who fixes it. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/8015 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC