[GHC] #9113: Template Haskell should warn about non-exhaustive pattern matches

#9113: Template Haskell should warn about non-exhaustive pattern matches -------------------------+------------------------------------------------- Reporter: tvh | Owner: Type: bug | Status: new Priority: | Milestone: normal | Version: 7.8.2 Component: | Operating System: Unknown/Multiple Template Haskell | Type of failure: Incorrect warning at Keywords: | compile-time Architecture: | Test Case: Unknown/Multiple | Blocking: Difficulty: | Unknown | Blocked By: | Related Tickets: | -------------------------+------------------------------------------------- When using Typed Template Haskell, There are no warings for non-exhaustive patterns inside the quote. {{{ {-# LANGUAGE TemplateHaskell #-} module Foo where import Language.Haskell.TH.Lib foo :: Maybe Int -> TExpQ Bool foo x = [||case x of Nothing -> False||] }}} Instead the warnings appear where the code is spliced. {{{ {-# LANGUAGE TemplateHaskell #-} module Bar where import Foo x = $$(foo (Just 1)) }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9113 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9113: Template Haskell should warn about non-exhaustive pattern matches -------------------------------------------------+------------------------- Reporter: tvh | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Template Haskell | Version: 7.8.2 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: -------------------------------------------------+------------------------- Changes (by simonpj): * cc: dimitris@… (added) Comment: Good point. Currently pattern-match overlap warnings are produced as part of desugaring, which doesn't happen when type-checking the quotation. However Dimitrios and some colleagues are thinking about how to integrate pattern-match overlap checking with the type checker, which would have the effect of solving this at the same time. I'll add him in cc. Simon -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9113#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9113: Template Haskell should warn about non-exhaustive pattern matches -------------------------------------+------------------------------------- Reporter: tvh | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: Component: Template Haskell | Version: 7.8.2 Resolution: duplicate | Keywords: | PatternMatchWarnings Operating System: Unknown/Multiple | Architecture: Type of failure: Incorrect | Unknown/Multiple warning at compile-time | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by simonpj): * keywords: => PatternMatchWarnings -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9113#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC