Exception: expectJust upsweep1, reloading an hs-boot file in GHCi
I unfortunately don't have a reproducer for this bug, and it only occurred once, but I thought I should write it down anyway.
I had a package partially loaded in GHCi
, and changed the module MyModule
, which has an associated hs-boot
file. This forced recompilation of the hs-boot
file, giving the following error:
cabal repl MyPackage
Preprocessing executable 'MyExecutable' for MyPackage-0.1.0.0..
GHCi, version 8.8.4: https://www.haskell.org/ghc/ :? for help
[1 of 37] Compiling [...]
[2 of 37] Compiling [...]
[...]
[29 of 37] Compiling [...]
SomeOtherModule.hs: error: [some correct error message]
Failed, 31 modules loaded.
-- at this point I edit MyModule.hs and reload
> :r
[23 of 37] Compiling MyModule[boot] ( MyModule.hs-boot, interpreted )
*** Exception: expectJust upsweep1
CallStack (from HasCallStack):
error, called at compiler\\utils\\Maybes.hs:56:27 in ghc:Maybes
expectJust, called at compiler\\main\\GhcMake.hs:1528:32 in ghc:GhcMake
> :r
[ ... compiling modules ]
Ok, 37 modules loaded.
As the above log shows, reloading made the error go away and I can't seem to reproduce it. The error message seems to point to GHC.Driver.Make.upsweep_mod
.
GHC version: 8.8.4
Operating system: Windows 10 x64