[GHC] #13021: Inaccessible RHS warning is confusing for users

GHC ghc-devs at haskell.org
Wed Dec 21 17:12:00 UTC 2016


#13021: Inaccessible RHS warning is confusing for users
-------------------------------------+-------------------------------------
        Reporter:  mpickering        |                Owner:
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.0.1
      Resolution:                    |             Keywords:
                                     |  PatternMatchWarnings
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by mpickering):

 The `COMPLETE` pragma is an assertion that writing a function which
 matches on each of the constructors in the set is total. In this example,
 for this to be true, there can be no `A` values as if there were, no
 function just matching on `B` would be total. Thus, the warning about the
 inaccessible RHS is correct wrt the assertion made by the programmer.

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


More information about the ghc-tickets mailing list