Closed philderbeast closed 1 year ago
I've done more testing and found that compilation completes with ghc-9.4.5
and ghc-9.2.7
but with all of the following fails in the same way (and upping -fconstraint-solver-iterations
doesn't help):
ghc-9.4.4
ghc-9.4.3
ghc-9.4.2
ghc-9.4.1
$ cabal repl squeal-postgresql
Resolving dependencies...
Build profile: -w ghc-9.4.1 -O1
...
src/Squeal/PostgreSQL/Expression/Type.hs:325:19: error:
• solveWanteds: too many iterations (limit = 4)
Unsolved: WC {wc_simple =
[W] irred_arzs {0}:: sop-core-0.5.0.2:Data.SOP.Constraint.AllF
KnownNat ns0 (CIrredCan(irred))
[W] irred_arzy {0}:: sop-core-0.5.0.2:Data.SOP.Constraint.AllF
SOP.Top ns0 (CIrredCan(irred))
[W] $dAll_arzz {0}:: SOP.All SOP.Top ns0 (CDictCan(psc))
[W] $dAll_arzl {0}:: SOP.All KnownNat ns0 (CDictCan)}
Simples: {[W] irred_arzs {0}:: sop-core-0.5.0.2:Data.SOP.Constraint.AllF
KnownNat ns0 (CIrredCan(irred)),
[W] irred_arzy {0}:: sop-core-0.5.0.2:Data.SOP.Constraint.AllF
SOP.Top ns0 (CIrredCan(irred)),
[W] $dAll_arzz {0}:: SOP.All SOP.Top ns0 (CDictCan(psc)),
[W] $dAll_arzl {0}:: SOP.All KnownNat ns0 (CDictCan)}
• In the type signature:
renderDims :: forall ns. SOP.All KnownNat ns => ByteString
In an equation for ‘fixarray’:
fixarray ty
= UnsafeTypeExpression $ renderSQL ty <> renderDims @dims
where
renderDims :: forall ns. SOP.All KnownNat ns => ByteString
renderDims
= ("[" <>) . (<> "]") . intercalate "][" . SOP.hcollapse
$ SOP.hcmap
(SOP.Proxy @KnownNat) (SOP.K . fromString . show . natVal)
(SOP.hpure SOP.Proxy :: SOP.NP SOP.Proxy ns)
Suggested fix:
Set limit with -fconstraint-solver-iterations=n; n=0 for no limit
|
325 | renderDims :: forall ns. SOP.All KnownNat ns => ByteString
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
This is "GHC 9.4 regression: solveWanteds: too many iterations" ghc#22516 (discussed on generics-sop#158), fixed in ghc-9.4.5.
A follow on from #335 for
ghc-9.4.5
.Use a couple of alternate source-repository-package dependencies until records-sop is updated and published to hackage, see https://github.com/kosmikus/records-sop/issues/12.