[GHC] #8095: TypeFamilies painfully slow

GHC ghc-devs at haskell.org
Fri Nov 21 00:41:07 UTC 2014


#8095: TypeFamilies painfully slow
-------------------------------------+-------------------------------------
              Reporter:              |            Owner:
  MikeIzbicki                        |           Status:  new
                  Type:  bug         |        Milestone:  7.10.1
              Priority:  high        |          Version:  7.6.3
             Component:  Compiler    |         Keywords:
  (Type checker)                     |     Architecture:  Unknown/Multiple
            Resolution:              |       Difficulty:  Unknown
      Operating System:              |       Blocked By:
  Unknown/Multiple                   |  Related Tickets:  5321
       Type of failure:  Compile-    |
  time performance bug               |
             Test Case:              |
              Blocking:              |
Differential Revisions:              |
-------------------------------------+-------------------------------------
Changes (by thomie):

 * priority:  normal => high
 * milestone:   => 7.10.1


Comment:

 Running the first example from the description with ghc HEAD:
 {{{
 $ ./Types 200 a a > test.hs && ghc-7.9.20141119 test.hs > /dev/null
 -fcontext-stack=250 +RTS -t

 test.hs:12:10:
     Type function application stack overflow; size = 201
     Use -ftype-function-depth=N to increase stack size to N
       Replicate1 'Zero () ~ '[]
     In the instance declaration for ‘Class (Data xs)’
 <<ghc: 3459540512 bytes, 388 GCs,
 70724196/419708144 avg/max bytes residency (12 samples), 815M in use,
 0.001 INIT (0.001 elapsed), 36.325 MUT (36.475 elapsed), 5.933 GC (5.971
 elapsed)
 :ghc>>
 }}}

 That's a lot of bytes. Adding `-ftype-function-depth=250` doesn't help:
 ever increasing memory usage until I have to kill the process. I did not
 try any of the other examples.

 This looks like a regression, setting priority to high.

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


More information about the ghc-tickets mailing list