Skip to content

Compiler panic when compiling Cabal with 8.10.1 and `dno-typeable-binds`

I wondered about the cost of Typeable (see #13261) bindings on real world code so wanted to do the "Cabal test" (compiling cabal the library).

However this surprisingly triggered a panic instead.

Andi@___ MINGW64 ~/cabal-head/Cabal
$ ghc -O Setup.hs -fforce-recomp  -dno-typeable-binds +RTS -s
[  1 of 242] Compiling Distribution.Compat.Async ( Distribution\Compat\Async.hs, Distribution\Compat\Async.o )
GHC error in desugarer lookup in Distribution.Compat.Async:
  attempting to use module `main:Distribution.Compat.Async' (.\Distribution\Compat\Async.hs) which is not loaded
ghc.exe: panic! (the 'impossible' happened)
  (GHC version 8.10.1:
        initDs

Please report this as a GHC bug:  https://www.haskell.org/ghc/reportabug

     750,182,440 bytes allocated in the heap
      89,913,368 bytes copied during GC
      24,635,776 bytes maximum residency (8 sample(s))
         857,728 bytes maximum slop
              49 MiB total memory in use (0 MB lost due to fragmentation)

                                     Tot time (elapsed)  Avg pause  Max pause
  Gen  0       308 colls,     0 par    0.094s   0.061s     0.0002s    0.0082s
  Gen  1         8 colls,     0 par    0.062s   0.090s     0.0112s    0.0231s

  TASKS: 5 (1 bound, 4 peak workers (4 total), using -N1)

  SPARKS: 0 (0 converted, 0 overflowed, 0 dud, 0 GC'd, 0 fizzled)

  INIT    time    0.000s  (  0.000s elapsed)
  MUT     time    0.281s  (  2.163s elapsed)
  GC      time    0.156s  (  0.151s elapsed)
  EXIT    time    0.000s  (  0.000s elapsed)
  Total   time    0.438s  (  2.314s elapsed)

  Alloc rate    2,667,315,342 bytes per MUT second

  Productivity  64.3% of total user, 93.5% of total elapsed
Edited by Ben Gamari
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information