[GHC] #11316: Too many guards warning causes issues

GHC ghc-devs at haskell.org
Wed Dec 30 14:55:33 UTC 2015


#11316: Too many guards warning causes issues
-------------------------------------+-------------------------------------
        Reporter:  NeilMitchell      |                Owner:
            Type:  bug               |               Status:  new
        Priority:  high              |            Milestone:  8.0.1
       Component:  Compiler          |              Version:  7.11
      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 NeilMitchell):

 It seems that if the final guard is {{{| otherwise}}} you could short-
 circuit the entire analysis pass, since we immediately know what the
 result is going to be. In such circumstances, emitting a warning about a
 failed analysis which could be trivially avoided seems unnecessary. It
 would also provide a simple way for users with "excessively complex"
 guards to disable the warning, simply add {{{| otherwise -> error "GHC
 can't cope with this many guards"}}}. No need for the pragma then.

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


More information about the ghc-tickets mailing list