[GHC] #14838: missing "incomplete-patterns" warning for TH-generated functions

GHC ghc-devs at haskell.org
Fri Mar 2 21:53:55 UTC 2018


#14838: missing "incomplete-patterns" warning for TH-generated functions
-------------------------------------+-------------------------------------
        Reporter:  gelisam           |                Owner:  (none)
            Type:  bug               |               Status:  patch
        Priority:  normal            |            Milestone:
       Component:  Template Haskell  |              Version:  8.2.2
      Resolution:                    |             Keywords:
                                     |  PatternMatchWarnings
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Incorrect         |  Unknown/Multiple
  error/warning at compile-time      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):  Phab:D4440
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by Ben Gamari <ben@…>):

 In [changeset:"ffb2738f86c4e4c3f0eaacf0a95d7326fdd2e383/ghc"
 ffb2738f/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="ffb2738f86c4e4c3f0eaacf0a95d7326fdd2e383"
 Fix #14838 by marking TH-spliced code as FromSource

 Previously, any Template Haskell code that was spliced would
 be marked as `Generated`, which would completely suppress pattern-
 match coverage warnings for it, which several folks found confusing.
 Indeed, Template Haskell-spliced code is "source" code in some sense,
 as users specifically request that it be put into their program, so
 changing its designation to `FromSource` makes sense from that
 perspective.

 Test Plan: make test TEST=T14838

 Reviewers: goldfire, bgamari

 Reviewed By: bgamari

 Subscribers: rwbarton, thomie, carter

 GHC Trac Issues: #14838

 Differential Revision: https://phabricator.haskell.org/D4440
 }}}

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14838#comment:8>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list