[GHC] #14987: Memory usage exploding for complex pattern matching

GHC ghc-devs at haskell.org
Fri Mar 30 10:03:13 UTC 2018


#14987: Memory usage exploding for complex pattern matching
-------------------------------------+-------------------------------------
           Reporter:  vmiraldo       |             Owner:  (none)
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  Compiler       |           Version:  8.4.1
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  Compile-time
  Unknown/Multiple                   |  crash or panic
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 It seems like complex pattern matching is consuming a prohibitive amount
 of memory. From a discussion in ghc-devs,
 [https://mail.haskell.org/pipermail/ghc-devs/2018-March/015538.html], the
 exhaustiveness checker could be the culprit.

 We have tried with 7.10.3, 8.0.2, 8.4.1 and ghc-HEAD. They show similar
 results.

 The "-fmax-pmchecker-iterations=0" option seems to help slightly. Bigger
 cases
 will run out of memory even with the option enabled.

 I'm attaching a "minimal" example to help diagnosing. The majority of the
 code has been generated by Template Haskell.

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


More information about the ghc-tickets mailing list