GHC 9.8.1 panic on poly library
GHC 9.8.1 is panicking when trying to build the poly
library. Seems to be fine with older compilers.
Trace here:
https://gitlab.horizon-haskell.net/package-sets/horizon-advance/-/jobs/695569
poly> [20 of 21] Compiling Data.Poly.Sparse.Laurent ( src/Data/Poly/Sparse/Laurent.hs, dist/build/Data/Poly/Sparse/Laurent.p_o )
poly> <no location info>: error:
poly> panic! (the 'impossible' happened)
poly> GHC version 9.8.1:
poly> lookupIdSubst
poly> step1_Xh
poly> InScope {eta_B0 n1_X2 ipv_X3 ipv_X6 ipv1_X7 ipv2_X8 n1_Xf ipv_Xg
poly> v2_adj0 n1_adj1 ipv_adj3 x_aeYl wild_ag11 ds_ag12 ds1_ag13 ds2_ag14
poly> ds3_ag15 wild1_ag17 s_ag19 step1_ag1d t_ag1e ds5_ag1g wild2_ag1j
poly> x_ag1k s'_ag1l wild2_ag2F a_a1Mnj v_a1Mnk w_a1Mnl $dEq_a1Mnm
poly> $dSemiring_a1Mnn $dVector_a1Mno $dVector_a1Mnp nt_i1abe ipv_i1abf
poly> ipv1_i1abg ipv2_i1abh wild_i1Mtc ps_i1Mtd c_i1Mte ww_i1MJw
poly> ww1_i1MJx wild1_i1MJz ww2_i1MJA ww3_i1MJB monomial scale ^- eval
poly> subst deriv $mX $bX $trModule $trModule_s1Myo $trModule_s1Myp
poly> $trModule_s1Myq $trModule_s1Myr $dKnownNat_s1Myz $dKnownNat_s1MyD
poly> $dKnownNat_s1MyF $dKnownNat_s1MyV $dSemiring1_s1MyX xs_s1Mz1
poly> v1_s1Mzf v2_s1Mzh off_s1Mzt v1_s1Mzv v2_s1Mzx $j_s1MzF
poly> $dKnownNat_s1MzJ $szipWithM_s1MAz $sunstream_s1MB4 $sunstream_s1MBz
poly> $snew_s1MBB $snew_s1MBD $smapM_s1MBJ $snull_s1MBP $sfoldlM'_s1MBU
poly> $sunsafeIndex_s1MBY $sunsafeIndex_s1MC2 $sclone_s1MC9 lvl_s1MCd
poly> lvl_s1MCe lvl_s1MCx lvl_s1MCQ lvl_s1MCU lvl_s1MCV lvl_s1MD4
poly> lvl_s1MD7 lvl_s1MDa lvl_s1MDd lvl_s1MDe lvl_s1MDf lvl_s1MDg
poly> lvl_s1MDh lvl_s1MDi lvl_s1MDl lvl_s1MDo lvl_s1MDr lvl_s1MDu
poly> lvl_s1MDv lvl_s1MDw lvl_s1MDx lvl_s1MDy lvl_s1MDz lvl_s1MDC
poly> lvl_s1MDF lvl_s1MDI lvl_s1MDL lvl_s1MDM lvl_s1MDN lvl_s1MDO
poly> lvl_s1MDP lvl_s1MDQ lvl_s1MDT lvl_s1MDW lvl_s1MDZ lvl_s1ME2
poly> lvl_s1ME3 lvl_s1ME4 lvl_s1ME5 lvl_s1ME6 lvl_s1ME7 lvl_s1ME8
poly> lvl_s1ME9 lvl_s1MEa lvl_s1MEb lvl_s1MEc lvl_s1MEd lvl_s1MEf
poly> lvl_s1MEg lvl_s1MEh lvl_s1MEi lvl_s1MEl lvl_s1MEv f_s1MEx lvl_s1MEy
poly> eta1_s1MEA lvl_s1MEB eta_s1MED lvl_s1MEE lvl_s1MEG lvl_s1MEH
poly> lvl_s1MEJ lvl_s1MEK lvl_s1MEM lvl_s1MEN lvl_s1MEP lvl_s1MEQ
poly> lvl_s1MER lvl_s1MES lvl_s1MET lvl_s1MEU lvl_s1MEV lvl_s1MEW
poly> eta3_s1MF1 lvl_s1MF2 lvl_s1MF3 lvl_s1MF4 lvl_s1MF5 lvl_s1MF6
poly> lvl_s1MF7 lvl_s1MF9 lvl_s1MFc lvl_s1MFj lvl_s1MFk lvl_s1MFm
poly> lvl_s1MFo lvl_s1MFp lvl_s1MFq lvl_s1MFr lvl_s1MFt lvl_s1MFv
poly> lvl_s1MFx lvl_s1MFA lvl_s1MFH lvl_s1MFI lvl_s1MFK lvl_s1MFL
poly> lvl_s1MFM lvl_s1MFO lvl_s1MFP lvl_s1MFQ eta_s1MFS lvl_s1MFU
poly> lvl_s1MFV lvl_s1MG1 lvl_s1MG4 lvl_s1MG8 loc22_s1MGb lvl_s1MGc
poly> loc11_s1MGf lvl_s1MGg loc12_s1MGj loc1_s1MGl loc2_s1MGn loc17_s1MGp
poly> loc3_s1MGr lvl_s1MGs $dIP2_s1MGv $dIP3_s1MGx lvl_s1MHq lvl_s1MHs
poly> lvl_s1MHt lvl_s1MHv lvl_s1MHw lvl_s1MHy lvl_s1MHz lvl_s1MHB
poly> lvl_s1MHC lvl_s1MHD lvl_s1MHE lvl_s1MHF lvl_s1MHG lvl_s1MHH
poly> lvl_s1MHI lvl_s1MHL lvl_s1MHP lvl_s1MHQ lvl_s1MLp lvl_s1MLq
poly> lvl_s1MLr lvl_s1MLs lvl_s1MLt lvl_s1MLu lvl_s1MLv lvl_s1MLw
poly> lvl_s1MLx lvl_s1MLy lvl_s1MLz lvl_s1MLA lvl_s1MLB lvl_s1MLC
poly> lvl_s1MLD lvl_s1MLE $j_s1MTI lvl_s1N0f lvl_s1N0h lvl_s1N0j
poly> lvl_s1N0l lvl_s1N2v lvl_s1N2x ds4_s1NeX ww_s1Nf2 ww_s1Nf3 ww_s1Nf4
poly> ww_s1Nf6 s1_s1Nf8 $wfoldlM'_loop_s1Nfa nt_s1Njn}
poly> Call stack:
poly> CallStack (from HasCallStack):
poly> callStackDoc, called at compiler/GHC/Utils/Panic.hs:191:37 in ghc-9.8.1-inplace:GHC.Utils.Panic
poly> pprPanic, called at compiler/GHC/Core/Subst.hs:197:17 in ghc-9.8.1-inplace:GHC.Core.Subst
poly> CallStack (from HasCallStack):
poly> panic, called at compiler/GHC/Utils/Error.hs:503:29 in ghc-9.8.1-inplace:GHC.Utils.Error
poly> Please report this as a GHC bug: https://www.haskell.org/ghc/reportabug
poly>
poly> [21 of 21] Compiling Data.Poly.Sparse.Semiring ( src/Data/Poly/Sparse/Semiring.hs, dist/build/Data/Poly/Sparse/Semiring.p_o )
error: builder for '/nix/store/43v57lzxyb57jk8jlfmq3fmak418phq6-poly-0.5.1.0.drv' failed with exit code 1;
last 10 log lines:
> CallStack (from HasCallStack):
> callStackDoc, called at compiler/GHC/Utils/Panic.hs:191:37 in ghc-9.8.1-inplace:GHC.Utils.Panic
> pprPanic, called at compiler/GHC/Core/Subst.hs:197:17 in ghc-9.8.1-inplace:GHC.Core.Subst
> CallStack (from HasCallStack):
> panic, called at compiler/GHC/Utils/Error.hs:503:29 in ghc-9.8.1-inplace:GHC.Utils.Error
>
>
> Please report this as a GHC bug: https://www.haskell.org/ghc/reportabug
>
> [21 of 21] Compiling Data.Poly.Sparse.Semiring ( src/Data/Poly/Sparse/Semiring.hs, dist/build/Data/Poly/Sparse/Semiring.p_o )
Reproduce with:
git clone https://gitlab.horizon-haskell.net/package-sets/horizon-advance
cd horizon-advance
git checkout poly-failure
nix build .#poly