[GHC] #9978: DEBUG is always replaced as 1 when CPP pragma is on

#9978: DEBUG is always replaced as 1 when CPP pragma is on -------------------------------------+------------------------------------- Reporter: danilo2 | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.4 (Parser) | Operating System: Unknown/Multiple Keywords: | Type of failure: None/Unknown Architecture: | Blocked By: Unknown/Multiple | Related Tickets: Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Trying to compile the following code: {{{ {-# LANGUAGE CPP #-} data Level = DEBUG }}} results in error: {{{ Test.hs:2:14: Illegal literal in type (use DataKinds to enable): 1 }}} which is of course an error. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9978 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9978: DEBUG is always replaced as 1 when CPP pragma is on -------------------------------------+------------------------------------- Reporter: danilo2 | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.4 (Parser) | Keywords: cpp Resolution: | Architecture: Operating System: Unknown/Multiple | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by hvr): * keywords: => cpp -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9978#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9978: DEBUG is always replaced as 1 when CPP pragma is on -------------------------------------+------------------------------------- Reporter: danilo2 | Owner: Type: bug | Status: infoneeded Priority: normal | Milestone: Component: Compiler | Version: 7.8.4 (Parser) | Keywords: cpp Resolution: | Architecture: Operating System: Unknown/Multiple | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by thomie): * status: new => infoneeded Comment: I can not reproduce your problem. Can you paste the output of the following command with your program above: `ghc-7.8.4 -E T9978.hs -fforce-recomp -v`. Check if it contains `-DDEBUG`, and why. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9978#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9978: DEBUG is always replaced as 1 when CPP pragma is on -------------------------------------+------------------------------------- Reporter: danilo2 | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 7.8.4 (Parser) | Resolution: worksforme | Keywords: cpp Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by thomie): * status: infoneeded => closed * resolution: => worksforme Comment: As I said, I can not reproduce this issue. Maybe check if the output of `ghc --info` contains `-DDEBUG` for some reason, that would explain it. Please reopen if you can reproduce this issue with ghc-7.10.2. Thanks. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9978#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC