You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Repro.hs:1:1:error: [GHC-95822]
solveWanteds: too many iterations (limit =500)
Unsolved:WC {wc_simple =
[W] $dKnownNat_a48X {0}::KnownNat (Lengthz) (CNonCanonical)}
Simples: {[W] $dKnownNat_a3Rp {0}::KnownNatm0 (CNonCanonical),
[W] hole{co_a3Rr} {0}:: (n0+m0) ~Lengthz (CNonCanonical),
[W] $dKnownNat_a3Ru {0}::KnownNat (Lengthz0) (CNonCanonical),
[W] hole{co_a3Rw} {0}::Lengthz0~m0 (CNonCanonical)}
Suggested fix:Set limit with -fconstraint-solver-iterations=n; n=0 for no limit
|1| {-# LANGUAGE GADTs #-}
|^
This comes from the use of blob sections which asks for KnownNat (Length z1) - z1 being the parameter in sections :: Rom z1. Run without the plugins:
Repro.hs:38:43: error: [GHC-39999]
• Could not deduce ‘KnownNat (Length z1)’
arising from a use of ‘++#’
from the context: KnownNat (Length z)
bound by the type signature for:
blob :: forall (z :: Sections).
KnownNat (Length z) =>
Rom z -> BitVector (Length z)
at Repro.hs:(33,1)-(36,22)
or from: (z ~ ConsSections n z1, KnownNat n)
bound by a pattern with constructor:
RomCons :: forall (n :: Nat) (z :: Sections).
KnownNat n =>
BitVector n -> Rom z -> Rom (ConsSections n z),
in an equation for ‘blob’
at Repro.hs:38:7-30
• In the expression: section ++# (blob sections)
In an equation for ‘blob’:
blob (RomCons section sections) = section ++# (blob sections)
|
38 | blob (RomCons section sections) = section ++# (blob sections)
| ^^^
I would expect this to work, since we know z ~ ConsSections n z1 and could obtain Length (ConsSections n z1) = n + Length z1, so from KnownNat (Length z) and KnownNat n I would expect to obtain KnownNat (Length z1).
Christiaan showed me this workaround using subSNat, which does compile:
If I submit this program:
I get:
This comes from the use of
blob sections
which asks forKnownNat (Length z1)
-z1
being the parameter insections :: Rom z1
. Run without the plugins:I would expect this to work, since we know
z ~ ConsSections n z1
and could obtainLength (ConsSections n z1) = n + Length z1
, so fromKnownNat (Length z)
andKnownNat n
I would expect to obtainKnownNat (Length z1)
.Christiaan showed me this workaround using
subSNat
, which does compile:Apologies for the less than stellar title, I don't really understand the structure of the problem...
The text was updated successfully, but these errors were encountered: