[GHC] #8101: No pattern match non-exhaustiveness warnings when compiling with -fno-code

#8101: No pattern match non-exhaustiveness warnings when compiling with -fno-code -------------------------+------------------------------------------------- Reporter: exbb2 | Owner: Type: bug | Status: new Priority: | Milestone: normal | Version: 7.6.3 Component: | Operating System: Unknown/Multiple Compiler | Type of failure: Incorrect warning at Keywords: | compile-time Architecture: | Test Case: Unknown/Multiple | Blocking: Difficulty: | Unknown | Blocked By: | Related Tickets: | -------------------------+------------------------------------------------- {{{ {-# OPTIONS_GHC -Wall #-} module A where data ABC = A | B | C abc :: ABC -> Int abc x = case x of A -> 1 }}} {{{ $ ghc -fno-code -fforce-recomp /tmp/A.hs [1 of 1] Compiling A ( /tmp/A.hs, nothing ) }}} {{{ $ ghc -fobject-code -fforce-recomp /tmp/A.hs [1 of 1] Compiling A ( /tmp/A.hs, /tmp/A.o ) /tmp/A.hs:7:9: Warning: Pattern match(es) are non-exhaustive In a case alternative: Patterns not matched: B C }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8101 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8101: No pattern match non-exhaustiveness warnings when compiling with -fno-code
-------------------------------------------------+-------------------------
Reporter: exbb2 | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.6.3
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: Incorrect warning at | Unknown/Multiple
compile-time | Difficulty:
Test Case: | Unknown
Blocking: | Blocked By:
| Related Tickets:
-------------------------------------------------+-------------------------
Comment (by ian@…):
commit b475be321106f79da115ae203a5a27fabfbb80d8
{{{
Author: Ian Lynagh

#8101: No pattern match non-exhaustiveness warnings when compiling with -fno-code -------------------------------------------------+------------------------- Reporter: exbb2 | Owner: Type: bug | Status: Priority: normal | closed Component: Compiler | Milestone: 7.8.1 Resolution: fixed | Version: 7.6.3 Operating System: Unknown/Multiple | Keywords: Type of failure: Incorrect warning at | Architecture: compile-time | Unknown/Multiple Test Case: T8101 | Difficulty: Blocking: | Unknown | Blocked By: | Related Tickets: -------------------------------------------------+------------------------- Changes (by igloo): * status: new => closed * testcase: => T8101 * resolution: => fixed * milestone: => 7.8.1 Comment: Thanks for the report; fixed. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8101#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8101: No pattern match non-exhaustiveness warnings when compiling with -fno-code -------------------------------------------------+------------------------- Reporter: exbb2 | Owner: Type: bug | Status: Priority: normal | closed Component: Compiler | Milestone: 7.8.1 Resolution: fixed | Version: 7.6.3 Operating System: Unknown/Multiple | Keywords: Type of failure: Incorrect warning at | Architecture: compile-time | Unknown/Multiple Test Case: T8101 | Difficulty: Blocking: | Unknown | Blocked By: | Related Tickets: -------------------------------------------------+------------------------- Comment (by monoidal): There's a comment in DynFlags, line 882, which might suggest this was deliberate. At least I would remove it: {{{ -- 'HscNothing' can be used to avoid generating any output, however, note -- that: -- -- * This will not run the desugaring step, thus no warnings generated in -- this step will be output. In particular, this includes warnings related -- to pattern matching. You can run the desugarer manually using -- 'GHC.desugarModule'. }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8101#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8101: No pattern match non-exhaustiveness warnings when compiling with -fno-code -------------------------------------------------+------------------------- Reporter: exbb2 | Owner: Type: bug | Status: Priority: normal | closed Component: Compiler | Milestone: 7.8.1 Resolution: fixed | Version: 7.6.3 Operating System: Unknown/Multiple | Keywords: Type of failure: Incorrect warning at | Architecture: compile-time | Unknown/Multiple Test Case: T8101 | Difficulty: Blocking: | Unknown | Blocked By: | Related Tickets: -------------------------------------------------+------------------------- Comment (by igloo): Hmm, thanks monoidal. It doesn't give a reason for that behaviour, so I've just removed the comment. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8101#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8101: No pattern match non-exhaustiveness warnings when compiling with -fno-code
-------------------------------------------------+-------------------------
Reporter: exbb2 | Owner:
Type: bug | Status:
Priority: normal | closed
Component: Compiler | Milestone: 7.8.1
Resolution: fixed | Version: 7.6.3
Operating System: Unknown/Multiple | Keywords:
Type of failure: Incorrect warning at | Architecture:
compile-time | Unknown/Multiple
Test Case: T8101 | Difficulty:
Blocking: | Unknown
| Blocked By:
| Related Tickets:
-------------------------------------------------+-------------------------
Comment (by ian@…):
commit 9e185cc06d9efa833f7b0efdcf3a1d434781ceb6
{{{
Author: Ian Lynagh

#8101: No pattern match non-exhaustiveness warnings when compiling with -fno-code -------------------------------------+------------------------------------- Reporter: exbb2 | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.8.1 Component: Compiler | Version: 7.6.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Incorrect | Unknown/Multiple warning at compile-time | Test Case: T8101 Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by DanielG): * status: closed => new * resolution: fixed => Comment: Looks to me like this is still an issue, I couldn't actually find a released version where this was ever fixed. This is also biting us in ghc-mod land: https://github.com/kazu-yamamoto /ghc-mod/issues/507 {{{ $ ghc-7.8.1 -fno-code -fforce-recomp A.hs [1 of 1] Compiling A ( A.hs, nothing ) $ ghc-7.8.4 -fno-code -fforce-recomp A.hs [1 of 1] Compiling A ( A.hs, nothing ) $ ghc-7.10.2 -fno-code -fforce-recomp A.hs [1 of 1] Compiling A ( A.hs, nothing ) # ghc-7.8.1 -fobject-code -fforce-recomp A.hs [1 of 1] Compiling A ( A.hs, A.o ) A.hs:7:9: Warning: Pattern match(es) are non-exhaustive In a case alternative: Patterns not matched: B C $ ghc-7.8.4 -fobject-code -fforce-recomp A.hs [1 of 1] Compiling A ( A.hs, A.o ) A.hs:7:9: Warning: Pattern match(es) are non-exhaustive In a case alternative: Patterns not matched: B C $ ghc-7.10.2 -fobject-code -fforce-recomp A.hs [1 of 1] Compiling A ( A.hs, A.o ) A.hs:7:9: Warning: Pattern match(es) are non-exhaustive In a case alternative: Patterns not matched: B C }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8101#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8101: No pattern match non-exhaustiveness warnings when compiling with -fno-code -------------------------------------+------------------------------------- Reporter: exbb2 | Owner: Type: bug | Status: closed Priority: normal | Milestone: 7.8.1 Component: Compiler | Version: 7.6.3 Resolution: duplicate | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Incorrect | Unknown/Multiple warning at compile-time | Test Case: T8101 Blocked By: | Blocking: Related Tickets: #10600 | Differential Revisions: -------------------------------------+------------------------------------- Changes (by rwbarton): * status: new => closed * resolution: => duplicate * related: => #10600 Comment: This was also recently reported in #10600, so closing in favor of that ticket. The fix here applied to one-shot mode (`-c`), but not make mode. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8101#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8101: No pattern match non-exhaustiveness warnings when compiling with -fno-code
-------------------------------------+-------------------------------------
Reporter: exbb2 | Owner:
Type: bug | Status: closed
Priority: normal | Milestone: 7.8.1
Component: Compiler | Version: 7.6.3
Resolution: duplicate | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: Incorrect | Unknown/Multiple
warning at compile-time | Test Case: T8101
Blocked By: | Blocking:
Related Tickets: #10600 | Differential Rev(s):
-------------------------------------+-------------------------------------
Comment (by Edward Z. Yang

#8101: No pattern match non-exhaustiveness warnings when compiling with -fno-code
-------------------------------------+-------------------------------------
Reporter: exbb2 | Owner: (none)
Type: bug | Status: closed
Priority: normal | Milestone: 7.8.1
Component: Compiler | Version: 7.6.3
Resolution: duplicate | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: Incorrect | Unknown/Multiple
warning at compile-time | Test Case: T8101
Blocked By: | Blocking:
Related Tickets: #10600 | Differential Rev(s):
-------------------------------------+-------------------------------------
Comment (by Ben Gamari
participants (1)
-
GHC