Skip to content

Backpack panic: Duplicate nodes keys in backpack file

Consider this .bkp file:

unit p where
  signature H where

unit q where
  module H where

unit r where
  dependency p
  dependency q[H=p:H]

There's a mistake: we mixed up p and q in the unit r.

This causes the following panic:

ghc: panic! (the 'impossible' happened)
  GHC version 9.7.20230504:
       Duplicate nodes keys in backpack file
  [q+q-9dU7VXZcSfk3MwGleJHyst:H, q+q-9dU7VXZcSfk3MwGleJHyst:H]

I am inclined to believe this is a bkpism (affects only the .bkp format and not cabal projects that use Backpack), but I haven't checked.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information