[GHC] #16314: Improve confusing error message with MINIMAL pragma

GHC ghc-devs at haskell.org
Wed Feb 13 11:58:41 UTC 2019


#16314: Improve confusing error message with MINIMAL pragma
-------------------------------------+-------------------------------------
        Reporter:  lerkok            |                Owner:  (none)
            Type:  feature request   |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.6.3
      Resolution:                    |             Keywords:
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 lerkok):

 Thanks Simon. But I think your example is quite different.

 In your case the pragma says `f | g`. So, I do agree the definitions for
 them should not cause a warning.

 But if I said `MINIMAL f, g` (i.e., `f` and `g` *must* both be defined)
 and have also given a definition for one of them, surely GHC can warn
 about that?

 In case there's a complex "boolean" expression in `MINIMAL` (such as `f |
 g, h` etc.) this might be hard to determine, but pretty much all my use
 cases have been a straight list of functions and defining one should be
 easy to detect to violate the requirements of `MINIMAL`.

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


More information about the ghc-tickets mailing list