Incorrect unit name in .bkp instantiation causes a panic
The following .bkp
file causes a panic:
unit basic where
signature Basic where
unit main where
dependency basic [ Basic = nonsense:Nonsense ]
ghc.exe --backpack Error1.bkp
[1 of 2] Processing basic
[1 of 1] Compiling Basic[sig] ( basic\Basic.hsig, nothing ) [Flags changed]
[2 of 2] Processing main
panic! (the 'impossible' happened)
GHC version 9.3.20210928:
no package name
CallStack (from HasCallStack):
error, called at compiler\GHC\Driver\Backpack.hs:647:32 in ghc:GHC.Driver.Backpack
It would be better to catch the problem early and report an appropriate error message.