[GHC] #9113: Template Haskell should warn about non-exhaustive pattern matches
GHC
ghc-devs at haskell.org
Thu May 15 05:18:50 UTC 2014
#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
More information about the ghc-tickets
mailing list