[GHC] #15305: Erroneous "non-exhaustive pattern match" using nested GADT with strictness annotation

GHC ghc-devs at haskell.org
Tue Jul 24 16:07:48 UTC 2018


#15305: Erroneous "non-exhaustive pattern match" using nested GADT with strictness
annotation
-------------------------------------+-------------------------------------
        Reporter:  jkoppel           |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:  8.6.1
       Component:  Compiler (Type    |              Version:  8.4.3
  checker)                           |             Keywords:
      Resolution:                    |  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):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by goldfire):

 If this were fixed, then I believe that GHC could usefully use empty types
 as many of its "Trees That Grow" extension fields, make the extensions
 strict, and then remove many tiresome panics in redundant patterns. For
 example (simplified):

 {{{#!hs
 data HsImplicitBndrs pass
   = UsefulConstructor ...
   | XHsImplicitBndrs !(XXHsImplicitBndrs pass)

 type instance XXHsImplicitBndrs (GhcPass _) = Void
 }}}

 Note the bang.

 Currently, if we did this, we would ''still'' need to match against
 `XHsImplicitBndrs` every time. But with this patch fixed, we could avoid
 doing so.

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


More information about the ghc-tickets mailing list