
#2260: Non-ideal error message for misplaced LANGUAGE pragma ----------------------------------+----------------------------------------- Reporter: TomMD | Owner: Type: bug | Status: new Priority: lowest | Milestone: 7.6.2 Component: Compiler (Parser) | Version: 6.8.2 Keywords: | Os: Unknown/Multiple Architecture: Unknown/Multiple | Failure: None/Unknown Difficulty: Unknown | Testcase: Blockedby: | Blocking: Related: | ----------------------------------+----------------------------------------- Comment(by shelarcy): GHC 7.x hide T2260.hs' problem. Because GHC 7.0.1 or higher uses Haskell 2010 in default, and Haskell 2010 supports EmptyDataDecls. * http://www.haskell.org/ghc/docs/7.0.1/html/users_guide/release-7-0-1.html * http://hackage.haskell.org/trac/haskell- prime/query?group=status&milestone=Haskell+2010 We should use Haskell98 to check this ticket's problem. {{{ $ghci T2260.hs -XHaskell98 GHCi, version 7.4.2: 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 ( T2260.hs, interpreted ) T2260.hs:5:1: `A' has no constructors (-XEmptyDataDecls permits this) In the data type declaration for `A' Failed, modules loaded: none. Prelude> :q Leaving GHCi. }}} {{{ $ ghci T2260_2.hs GHCi, version 7.4.2: 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 ( T2260_2.hs, interpreted ) T2260_2.hs:6:1: `A' has no constructors (-XEmptyDataDecls permits this) In the data type declaration for `A' Failed, modules loaded: none. Prelude> :q Leaving GHCi. }}} -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/2260#comment:13 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler